string = "+91 6238 492 730, +91 82817 85739, +92 320 2118719, +94 70 110 1902, +94 70 112 8049, +94 70 128 2043, +94 70 137 3438, +94 70 139 4765, +94 70 149 4036, +94 70 151 6145, +94 70 175 5292, +94 70 186 7277, +94 70 216 1305, +94 70 219 7739, +94 70 228 9102, +94 70 243 1173, +94 70 247 7729, +94 70 251 0176, +94 70 259 1658, +94 70 286 5723, +94 70 291 7740, +94 70 293 2707, +94 70 333 4233, +94 70 340 0743, +94 70 360 0092, +94 70 370 9680, +94 70 379 2238, +94 70 383 5144, +94 70 420 2424, +94 70 457 6494, +94 70 481 3203, +94 70 560 1404, +94 70 562 8373, +94 70 590 1178, +94 71 068 9564, +94 71 091 3298, +94 71 104 8775, +94 71 186 3034, +94 71 210 3808, +94 71 237 0679, +94 71 250 5241, +94 71 292 6296, +94 71 316 6235, +94 71 357 0378, +94 71 364 9728, +94 71 368 6418, +94 71 398 6740, +94 71 434 8471, +94 71 476 1387, +94 71 480 5524, +94 71 487 6345, +94 71 511 1077, +94 71 523 8206, +94 71 529 4687, +94 71 531 1486, +94 71 547 1130, +94 71 593 1092, +94 71 604 9915, +94 71 634 0445, +94 71 710 2761, +94 71 756 1256, +94 71 778 5429, +94 71 885 0589, +94 71 988 4634, +94 72 413 8795, +94 72 526 9631, +94 72 832 8185, +94 72 976 9045, +94 74 007 5052, +94 74 036 1659, +94 74 047 8724, +94 74 052 3156, +94 74 055 5091, +94 74 058 6107, +94 74 063 9537, +94 74 071 5921, +94 74 113 6297, +94 74 116 1566, +94 74 124 5295, +94 74 131 0264, +94 74 140 8483, +94 74 147 9710, +94 74 199 6731, +94 75 033 1665, +94 75 078 7961, +94 75 083 3544, +94 75 085 0418, +94 75 204 0164, +94 75 265 3410, +94 75 278 5903, +94 75 287 5701, +94 75 363 3804, +94 75 376 1186, +94 75 432 0074, +94 75 457 5465, +94 75 471 4765, +94 75 479 3133, +94 75 488 3879, +94 75 519 4443, +94 75 577 3824, +94 75 615 1703, +94 75 634 8648, +94 75 814 6210, +94 75 858 6991, +94 75 876 7271, +94 75 898 7853, +94 75 952 2351, +94 75 985 7446, +94 76 001 0465, +94 76 007 9642, +94 76 013 2884, +94 76 024 6379, +94 76 036 7495, +94 76 044 8739, +94 76 045 9745, +94 76 055 5414, +94 76 060 1368, +94 76 072 8548, +94 76 078 2157, +94 76 083 5509, +94 76 102 3591, +94 76 117 2872, +94 76 126 3083, +94 76 163 9624, +94 76 180 6417, +94 76 185 8833, +94 76 193 9074, +94 76 225 7042, +94 76 247 5981, +94 76 255 7487, +94 76 256 9476, +94 76 259 1328, +94 76 263 2555, +94 76 271 2984, +94 76 273 8081, +94 76 285 3001, +94 76 326 1880, +94 76 347 5353, +94 76 352 0330, +94 76 352 6181, +94 76 353 2662, +94 76 355 4147, +94 76 380 6220, +94 76 398 6184, +94 76 401 0397, +94 76 401 2780, +94 76 404 6568, +94 76 418 2300, +94 76 425 5908, +94 76 434 3414, +94 76 454 9052, +94 76 457 6017, +94 76 549 4211, +94 76 558 2489, +94 76 594 3330, +94 76 644 8560, +94 76 648 0584, +94 76 663 0162, +94 76 663 4915, +94 76 664 0261, +94 76 675 9102, +94 76 699 3414, +94 76 737 3812, +94 76 740 4637, +94 76 745 9851, +94 76 748 2625, +94 76 764 4821, +94 76 781 3681, +94 76 781 6294, +94 76 810 4250, +94 76 833 7133, +94 76 833 7677, +94 76 846 5272, +94 76 851 7700, +94 76 886 2456, +94 76 896 0362, +94 76 910 0967, +94 76 912 0360, +94 76 913 8681, +94 76 921 5326, +94 76 934 2165, +94 76 948 8404, +94 77 033 3266, +94 77 036 9553, +94 77 053 1343, +94 77 145 3072, +94 77 159 0910, +94 77 162 4157, +94 77 263 9031, +94 77 296 8708, +94 77 307 8977, +94 77 351 5790, +94 77 355 8804, +94 77 381 6395, +94 77 385 8815, +94 77 388 5284, +94 77 399 6295, +94 77 410 3406, +94 77 540 8212, +94 77 550 1515, +94 77 591 5681, +94 77 654 6834, +94 77 656 5311, +94 77 727 0161, +94 77 756 0489, +94 77 762 4035, +94 77 857 5436, +94 77 867 2907, +94 77 897 3637, +94 77 918 3131, +94 77 928 3740, +94 77 929 1207, +94 77 953 6058, +94 77 969 9791, +94 77 989 4772, +94 78 123 3085, +94 78 126 2499, +94 78 128 9020, +94 78 162 1419, +94 78 247 9164, +94 78 300 9975, +94 78 317 1416, +94 78 322 7189, +94 78 434 0635, +94 78 494 0318, +94 78 497 0476, +94 78 747 3196, +94 78 748 0727, +94 78 771 5445, +94 78 797 0348, +94 78 827 5464, +94 78 954 3334, +94 78 988 0983, +994 40 803 65 33,+94 70 103 9521, +94 70 124 2546, +94 70 133 6364, +94 70 133 7118, +94 70 135 8767, +94 70 137 2409, +94 70 140 9694, +94 70 154 7551, +94 70 272 8347, +94 70 282 0655, +94 70 295 2647, +94 70 297 9868, +94 70 305 7361, +94 70 316 1513, +94 70 349 2518, +94 70 363 2539, +94 70 389 4437, +94 70 446 0421, +94 70 509 7748, +94 70 527 3643, +94 70 562 6268, +94 71 070 5961, +94 71 082 8348, +94 71 084 4467, +94 71 089 7456, +94 71 137 6852, +94 71 148 8971, +94 71 214 4111, +94 71 254 1226, +94 71 283 5645, +94 71 317 4179, +94 71 338 6652, +94 71 338 8047, +94 71 363 4457, +94 71 405 7798, +94 71 417 6737, +94 71 422 9994, +94 71 520 8388, +94 71 527 3736, +94 71 528 2745, +94 71 528 3656, +94 71 608 5563, +94 71 633 5287, +94 71 671 3481, +94 71 678 9073, +94 71 691 7758, +94 71 696 1782, +94 71 709 0203, +94 71 799 2736, +94 71 855 9055, +94 71 864 2260, +94 71 892 4740, +94 71 979 4296, +94 71 989 0090, +94 72 472 7176, +94 74 012 7950, +94 74 030 0631, +94 74 038 0716, +94 74 074 6236, +94 74 092 0115, +94 74 114 6196, +94 74 117 1189, +94 74 118 7164, +94 74 132 3931, +94 74 133 3171, +94 74 143 9220, +94 74 165 7481, +94 74 168 1523, +94 74 199 0676, +94 75 080 1517, +94 75 335 6185, +94 75 363 7240, +94 75 381 2890, +94 75 406 0985, +94 75 424 2529, +94 75 530 4425, +94 75 531 1919, +94 75 580 7334, +94 75 590 7109, +94 75 610 9304, +94 75 631 0514, +94 75 704 1666, +94 75 714 5253, +94 75 727 0388, +94 75 747 0909, +94 75 766 0132, +94 75 969 7023, +94 76 030 5796, +94 76 032 0464, +94 76 046 6568, +94 76 049 2518, +94 76 052 8507, +94 76 064 2183, +94 76 066 7501, +94 76 068 5340, +94 76 079 9805, +94 76 082 0911, +94 76 102 3007, +94 76 129 9729, +94 76 200 4312, +94 76 262 7164, +94 76 349 8758, +94 76 377 3607, +94 76 384 0772, +94 76 396 8277, +94 76 406 1904, +94 76 425 3901, +94 76 457 6017, +94 76 465 2883, +94 76 582 1980, +94 76 595 2332, +94 76 620 0491, +94 76 671 9403, +94 76 708 3861, +94 76 724 7600, +94 76 728 6976, +94 76 730 1237, +94 76 809 7001, +94 76 815 3974, +94 76 838 2861, +94 76 853 3065, +94 76 857 2541, +94 76 862 4060, +94 76 878 6963, +94 76 889 4461, +94 76 889 6353, +94 76 986 7674, +94 77 023 2265, +94 77 061 1075, +94 77 115 8481, +94 77 138 9306, +94 77 169 7939, +94 77 178 1310, +94 77 242 6311, +94 77 249 5160, +94 77 284 7685, +94 77 297 6663, +94 77 372 2087, +94 77 411 2765, +94 77 412 8990, +94 77 450 0203, +94 77 472 5481, +94 77 542 0950, +94 77 543 7096, +94 77 544 0117, +94 77 639 5549, +94 77 674 9967, +94 77 682 4258, +94 77 745 0222, +94 77 802 5618, +94 77 805 2307, +94 77 814 9928, +94 77 819 4240, +94 77 941 7498, +94 77 945 2691, +94 77 983 5168, +94 78 138 9777, +94 78 181 6055, +94 78 248 4845, +94 78 257 9566, +94 78 288 3856, +94 78 330 4074, +94 78 399 8225, +94 78 432 2091, +94 78 473 2535, +94 78 513 6253, +94 78 583 7876, +94 78 662 2144, +94 78 696 9106, +94 78 740 4363, +94 78 768 0869, +94 78 801 4245, +94 78 883 8228, +94 78 919 0897, +971 52 789 8557,+94 70 100 6172, +94 70 101 4263, +94 70 112 9231, +94 70 178 4078, +94 70 291 7740, +94 70 294 3974, +94 70 306 6520, +94 70 391 1818, +94 70 502 4797, +94 70 530 0067, +94 70 579 8965, +94 70 586 9759, +94 71 123 4544, +94 71 137 2256, +94 71 232 3008, +94 71 297 5359, +94 71 300 7427, +94 71 303 5332, +94 71 420 9161, +94 71 483 5522, +94 71 487 6345, +94 71 566 7671, +94 71 584 7343, +94 71 593 1092, +94 71 607 0120, +94 71 610 9893, +94 71 620 9553, +94 71 667 9592, +94 71 735 4660, +94 71 736 9542, +94 71 947 3406, +94 71 988 4634, +94 74 011 9185, +94 74 022 9713, +94 74 036 0502, +94 74 096 9547, +94 74 098 8458, +94 74 118 6005, +94 74 199 6731, +94 75 014 1526, +94 75 070 2771, +94 75 205 5543, +94 75 278 5903, +94 75 279 7268, +94 75 363 3804, +94 75 364 5607, +94 75 389 2701, +94 75 390 6740, +94 75 421 4195, +94 75 426 6902, +94 75 457 5465, +94 75 611 6521, +94 75 683 0571, +94 75 742 9185, +94 75 783 8799, +94 75 864 9895, +94 75 906 2899, +94 75 997 9053, +94 76 013 7285, +94 76 042 9376, +94 76 064 5697, +94 76 069 5628, +94 76 143 9851, +94 76 166 8874, +94 76 176 0805, +94 76 202 3636, +94 76 215 2789, +94 76 256 9476, +94 76 261 5747, +94 76 270 5997, +94 76 282 4009, +94 76 282 4645, +94 76 373 7931, +94 76 377 1795, +94 76 387 1042, +94 76 407 0338, +94 76 423 7122, +94 76 425 5908, +94 76 459 4362, +94 76 475 9879, +94 76 484 2794, +94 76 484 5611, +94 76 496 0505, +94 76 541 0626, +94 76 580 5410, +94 76 590 7565, +94 76 658 0257, +94 76 668 4000, +94 76 792 7469, +94 76 908 0684, +94 76 912 0360, +94 76 921 5326, +94 76 924 7944, +94 77 054 8082, +94 77 101 8903, +94 77 135 7075, +94 77 279 9236, +94 77 325 1634, +94 77 340 5386, +94 77 369 2396, +94 77 591 5681, +94 77 591 6246, +94 77 623 7498, +94 77 656 5311, +94 77 826 9162, +94 77 843 7672, +94 77 864 6979, +94 77 867 2907, +94 77 875 3396, +94 77 994 7812, +94 78 123 3085, +94 78 186 3480, +94 78 264 0121, +94 78 427 8224, +94 78 434 0635, +94 78 487 2996, +94 78 616 5873, +94 78 637 2141, +94 78 638 2389, +94 78 649 7922, +94 78 823 4105, +94 78 967 8220, +994 40 924 87 00,+1 (234) 219-7664, +94 70 100 4656, +94 70 107 9015, +94 70 109 8244, +94 70 116 5863, +94 70 125 8331, +94 70 173 1605, +94 70 225 3846, +94 70 238 9784, +94 70 253 0891, +94 70 285 0190, +94 70 306 9111, +94 70 310 4859, +94 70 319 2027, +94 70 327 8178, +94 70 334 2148, +94 70 349 3675, +94 70 360 3190, +94 70 376 1359, +94 70 391 3149, +94 70 403 6050, +94 70 499 8119, +94 70 592 8138, +94 71 037 8531, +94 71 041 9421, +94 71 079 9448, +94 71 100 8328, +94 71 126 1714, +94 71 138 4390, +94 71 140 5475, +94 71 162 6065, +94 71 169 2049, +94 71 186 5045, +94 71 221 6322, +94 71 243 9793, +94 71 252 4814, +94 71 290 7201, +94 71 311 2123, +94 71 327 8576, +94 71 374 4934, +94 71 422 8709, +94 71 455 3645, +94 71 471 6059, +94 71 475 7922, +94 71 478 5596, +94 71 538 2124, +94 71 611 1047, +94 71 653 1308, +94 71 653 8914, +94 71 699 8633, +94 71 711 5661, +94 71 760 8424, +94 71 799 2846, +94 71 868 3151, +94 71 892 4839, +94 71 915 3667, +94 71 972 7085, +94 72 934 4124, +94 72 969 5727, +94 74 032 8631, +94 74 047 6557, +94 74 057 6327, +94 74 078 7276, +94 74 086 8405, +94 74 091 0460, +94 74 112 1290, +94 74 116 1566, +94 74 117 0555, +94 74 123 1121, +94 74 128 1827, +94 74 135 8748, +94 74 136 4461, +94 74 139 0520, +94 74 156 6932, +94 74 181 8974, +94 74 182 9970, +94 74 191 3830, +94 74 196 6838, +94 75 276 2134, +94 75 346 3884, +94 75 361 5105, +94 75 369 6232, +94 75 472 7200, +94 75 479 9511, +94 75 498 8011, +94 75 518 9659, +94 75 572 5999, +94 75 678 2458, +94 75 718 5236, +94 75 763 4167, +94 75 788 0288, +94 75 790 7083, +94 75 818 8660, +94 75 822 1802, +94 75 866 5700, +94 75 924 3527, +94 75 931 4122, +94 75 957 7901, +94 75 958 1499, +94 76 001 7055, +94 76 027 5692, +94 76 036 5832, +94 76 062 5650, +94 76 063 2842, +94 76 067 4209, +94 76 078 8173, +94 76 090 4291, +94 76 092 7288, +94 76 109 1000, +94 76 120 2044, +94 76 122 4167, +94 76 126 1723, +94 76 153 3240, +94 76 182 3047, +94 76 188 6670, +94 76 216 1329, +94 76 258 2466, +94 76 261 2855, +94 76 262 6978, +94 76 272 8233, +94 76 274 1916, +94 76 277 3620, +94 76 283 9278, +94 76 285 0019, +94 76 286 3030, +94 76 286 3781, +94 76 290 1024, +94 76 301 6748, +94 76 325 8696, +94 76 331 1810, +94 76 347 5960, +94 76 352 9540, +94 76 353 7979, +94 76 362 8388, +94 76 370 7919, +94 76 373 4112, +94 76 381 8600, +94 76 382 5268, +94 76 388 2857, +94 76 411 7683, +94 76 420 3375, +94 76 428 8223, +94 76 432 1199, +94 76 433 0122, +94 76 458 6091, +94 76 473 7772, +94 76 475 4634, +94 76 529 5620, +94 76 549 9289, +94 76 564 9437, +94 76 575 7658, +94 76 591 6749, +94 76 618 7001, +94 76 642 6417, +94 76 654 2633, +94 76 669 0415, +94 76 696 0463, +94 76 699 5810, +94 76 720 0603, +94 76 736 6256, +94 76 763 1058, +94 76 771 5891, +94 76 868 8774, +94 76 870 6972, +94 76 876 0880, +94 76 887 5902, +94 76 931 0349, +94 76 962 2254, +94 76 993 8492, +94 77 026 5866, +94 77 029 3565, +94 77 102 3699, +94 77 105 5670, +94 77 126 2977, +94 77 157 2995, +94 77 187 9613, +94 77 188 9304, +94 77 286 4490, +94 77 289 3275, +94 77 302 4264, +94 77 339 4620, +94 77 400 3420, +94 77 401 0538, +94 77 417 6779, +94 77 437 3314, +94 77 478 0643, +94 77 488 8622, +94 77 497 0408, +94 77 503 2325, +94 77 518 7803, +94 77 602 2452, +94 77 605 7484, +94 77 610 1400, +94 77 640 5618, +94 77 655 9332, +94 77 717 1581, +94 77 738 6960, +94 77 754 5070, +94 77 794 0747, +94 77 815 3991, +94 77 827 8777, +94 77 837 1045, +94 77 892 5118, +94 77 905 5772, +94 77 912 6634, +94 77 946 1883, +94 77 975 0902, +94 77 982 2685, +94 77 991 6172, +94 78 117 7410, +94 78 174 9550, +94 78 187 0549, +94 78 200 5241, +94 78 251 3631, +94 78 264 0121, +94 78 342 4177, +94 78 363 2810, +94 78 366 5478, +94 78 454 8290, +94 78 489 7614, +94 78 514 1896, +94 78 521 0827, +94 78 524 2466, +94 78 534 1497, +94 78 587 0408, +94 78 591 9707, +94 78 624 7090, +94 78 629 1394, +94 78 653 4990, +94 78 675 5254, +94 78 684 2540, +94 78 687 1043, +94 78 709 6922, +94 78 722 5456, +94 78 742 5665, +94 78 778 9480, +94 78 791 8551, +94 78 807 7462, +94 78 831 6399, +94 78 850 0611, +94 78 853 4232, +94 78 858 6994, +94 78 938 0241, +94 78 967 6428, +994 40 324 54 38, +994 40 537 46 97"


print(string)

listofstring = string.split(",")

print(listofstring)
print(len(listofstring))

setoflistofstring = set(listofstring)

print(setoflistofstring)
print(len(setoflistofstring))

 

Python Online Compiler

Write, Run & Share Python code online using OneCompiler's Python online compiler for free. It's one of the robust, feature-rich online compilers for python language, supporting both the versions which are Python 3 and Python 2.7. Getting started with the OneCompiler's Python editor is easy and fast. The editor shows sample boilerplate code when you choose language as Python or Python2 and start coding.

Taking inputs (stdin)

OneCompiler's python online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample python program which takes name as input and print your name with hello.

import sys
name = sys.stdin.readline()
print("Hello "+ name)

About Python

Python is a very popular general-purpose programming language which was created by Guido van Rossum, and released in 1991. It is very popular for web development and you can build almost anything like mobile apps, web apps, tools, data analytics, machine learning etc. It is designed to be simple and easy like english language. It's is highly productive and efficient making it a very popular language.

Tutorial & Syntax help

Loops

1. If-Else:

When ever you want to perform a set of operations based on a condition IF-ELSE is used.

if conditional-expression
    #code
elif conditional-expression
    #code
else:
    #code

Note:

Indentation is very important in Python, make sure the indentation is followed correctly

2. For:

For loop is used to iterate over arrays(list, tuple, set, dictionary) or strings.

Example:

mylist=("Iphone","Pixel","Samsung")
for i in mylist:
    print(i)

3. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while condition  
    #code 

Collections

There are four types of collections in Python.

1. List:

List is a collection which is ordered and can be changed. Lists are specified in square brackets.

Example:

mylist=["iPhone","Pixel","Samsung"]
print(mylist)

2. Tuple:

Tuple is a collection which is ordered and can not be changed. Tuples are specified in round brackets.

Example:

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)

Below throws an error if you assign another value to tuple again.

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)
myTuple[1]="onePlus"
print(myTuple)

3. Set:

Set is a collection which is unordered and unindexed. Sets are specified in curly brackets.

Example:

myset = {"iPhone","Pixel","Samsung"}
print(myset)

4. Dictionary:

Dictionary is a collection of key value pairs which is unordered, can be changed, and indexed. They are written in curly brackets with key - value pairs.

Example:

mydict = {
    "brand" :"iPhone",
    "model": "iPhone 11"
}
print(mydict)

Supported Libraries

Following are the libraries supported by OneCompiler's Python compiler

NameDescription
NumPyNumPy python library helps users to work on arrays with ease
SciPySciPy is a scientific computation library which depends on NumPy for convenient and fast N-dimensional array manipulation
SKLearn/Scikit-learnScikit-learn or Scikit-learn is the most useful library for machine learning in Python
PandasPandas is the most efficient Python library for data manipulation and analysis
DOcplexDOcplex is IBM Decision Optimization CPLEX Modeling for Python, is a library composed of Mathematical Programming Modeling and Constraint Programming Modeling