Not getting the satisfactory results , please help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
13th Jul 2018, 3:20 PM
Jashan Singh
Jashan Singh - avatar
3 Answers
+ 4
If your input is 200+100 you call the function 7 times and get a return value once. And 6 times none. This code would work: inp = input() def split(char,inp): for i in inp: if i ==char: return inp.split(char) print ( split("+", inp))
13th Jul 2018, 4:17 PM
Paul
Paul - avatar
13th Jul 2018, 4:25 PM
Maninder $ingh
Maninder $ingh - avatar
0
oops I was trying taking the for loop outside , thanks sir ,it really helped me
13th Jul 2018, 4:22 PM
Jashan Singh
Jashan Singh - avatar