What is split() And how to use? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is split() And how to use?

I in front of a python challenge

10th Apr 2021, 6:33 AM
Codemurai
Codemurai - avatar
1 Answer
+ 6
The split() method splits a string into a list. You can specify the separator, default separator is any whitespace. Ex:- txt="Hello world!!" x=txt.split() print(x)
10th Apr 2021, 6:36 AM
SAN
SAN - avatar