+ 3
How to use split in python
Split for 3 strings
5 Réponses
+ 7
Have you got to this part? if not, then just continue study Python tutorial 👍
https://www.sololearn.com/learn/Python/2456/
+ 9
Nabeel Ahmed , maybe you mean how to split a string with 3 words? this can be done like:
txt ="hello my world"
result = txt.split()
the string is now split and stored in list "result":
['hello', 'my', 'world']
+ 7
Parameters:
---> string.split(character)
character ---> whitespace by default
x = "One Two Three"
print(x.split())
>> ["One", "Two", "Three"]
x = "One Two Three"
print(x.split("T"))
>> ["One ", "wo ", "hree"]
+ 3
Thank you very much for your help
+ 3
Ok