Answers for "python split by list"

4

python split list

string = 'this is a python string'
wordList = string.split(' ')
Posted by: Guest on March-26-2020
0

python split list

string = "this is a string" 		# Creates the string
splited_string = string.split(" ")	# Splits the string by spaces
print(splited_string) 				# Prints the list to the console
# Output: ['this', 'is', 'a', 'string']
Posted by: Guest on March-29-2021

Python Answers by Framework

Browse Popular Code Answers by Language