Explain split method? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

Explain split method?

name = "Nitin" name.split('i') please explain this code

26th Jul 2018, 8:04 AM
Nitin Gutte
Nitin Gutte - avatar
2 Answers
+ 4
split method use for split the string.in your code it will split the string from the positions where is i present.output=['N','t','n']
26th Jul 2018, 8:26 AM
Maninder $ingh
Maninder $ingh - avatar
26th Jul 2018, 8:30 AM
giannismach - avatar