+ 12

🎅🎅(CHALLENGE)🎅🎅 Write a program that splits the user input. Follow the instructions below.

The program should split the user input, whether numbers or letters, individually, separated with commas, but with exception of those in bracket. EXAMPLE : user_input = 12(d4)e(1)ta(.) OUTPUT :1,2,d4,e,1,t,a,. ---- user_input = I(am)25df(jeid)(158) OUTPUT: I, am, 2,5,d,f,jeid,158 ALL LANGUAGES ARE WELCOME. I hope Python will rule😁😉. LET'S DO IT.

24th Nov 2017, 7:17 AM
Justine Ogaraku
Justine Ogaraku - avatar
13 odpowiedzi
24th Nov 2017, 12:17 PM
Käzî Mrîdùl Høssäîn
Käzî Mrîdùl Høssäîn - avatar
+ 10
Nice work guys. But guess what, Python is Dominating!!!!
24th Nov 2017, 3:38 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 9
congrats, to you, all codes are fixed
27th Nov 2017, 2:52 PM
Justine Ogaraku
Justine Ogaraku - avatar
+ 8
Nice work guys. I'm only having problems with Yuri and Ferhat, your codes aren't doing what I said its meant to do. Check it, debug and tell me when you're done. Well to all.😁
26th Nov 2017, 5:59 PM
Justine Ogaraku
Justine Ogaraku - avatar
24th Nov 2017, 10:02 AM
DAB
DAB - avatar
25th Nov 2017, 2:15 PM
Maya
Maya - avatar
26th Nov 2017, 8:58 AM
Ferhat Sevim
Ferhat Sevim - avatar
24th Nov 2017, 1:45 PM
Kartik
Kartik - avatar
+ 4
https://code.sololearn.com/c6F72Xe3f36j/?ref=app
24th Nov 2017, 10:43 PM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
25th Nov 2017, 4:55 PM
yuri
+ 1
I try
24th Nov 2017, 10:47 AM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
+ 1
Perl: @s = split /\((.*?)\)/, shift; for ($i=0; $i<@s;) { push @l, split(//, $s[$i++]), $s[$i++]; } print join ",", @l;
2nd Dec 2017, 1:49 AM
Rob Klinkhamer
Rob Klinkhamer - avatar