Python provides a function named split() which can be used to achieve this. It also provides a way to control the delimiter and number of characters to be considered as delimiter Example This will return below output
str = "Python Java PHP Flutter";
print(str.split())
print(str.split(' ', 2))
['Python', 'Java', 'PHP', 'Flutter']
['Python', 'Java', ' PHP Flutter']
What is PYTHONPATH environment variable?
Python a case sensitive language?
What is PYTHONHOME environment variable?
What is PYTHONSTARTUP environment variable?
What is Python?
var = "Python Programming" What is the output of print var?
How to split a string in Python
What is the output of print str[3:8] if str = 'Python Programming'?
What are the supported data types in Python?
List the features of Python?
What is raw_input() and input() in python