Answers for "convert string with comma to list python"

3

python list comma separated string

hobbies = ["basketball", "football", "swimming"]
print("My hobbies are:")      	# My hobbies are:
print(", ".join(hobbies)) 		# basketball, football, swimming
Posted by: Guest on February-16-2021
0

string to list in python comma

# input comma separated elements as string 
str = str (raw_input ("Enter comma separated integers: "))
print "Input string: ", str

# conver to the list
list = str.split (",")
print "list: ", list
Posted by: Guest on April-27-2020
0

convert list to string separated by comma python

converted_list = [str(element) for element in a_list]
Posted by: Guest on October-04-2020

Code answers related to "convert string with comma to list python"

Python Answers by Framework

Browse Popular Code Answers by Language