split() method returns a list of strings after breaking the given string by the specified separator.
separator : The is a delimiter. The string splits at this specified separator. If is not provided then any white space is a separator.
maxsplit : It is a number, which tells us to split the string into maximum of provided number of times. If it is not provided then there is no limit.
returns a list of strings after breaking the given string by the specified separator.
['geeks', 'for', 'geeks'] ['geeks', 'for', 'geeks'] ['geeks', 'for', 'geeks'] ['Cat', 'Bat', 'Sat', 'Fat', 'Or']
['geeks, for, geeks, pawan'] ['geeks', 'for', 'geeks', 'pawan'] ['geeks', 'for, geeks, pawan']
- Python | K Character Split String
- How to split a string in C/C++, Python and Java?
- Python | Split given string into equal halves
- Python | Split string on Kth Occurrence of Character
- Python | String Split including spaces
- Python | Split multiple characters from string
- Python program to split and join a string
- Python | Split string into list of characters
- Python - Split String of list on K character
- Split a string in equal parts (grouper in Python)
- Python | Split strings and digits from string list
- Python | Split CamelCase string to individual strings
- Python | Split string in groups of n consecutive characters
- Python | Pandas Split strings into two List/Columns using str.split()
- Python | Ways to split a string in different ways
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.