Answers for "mutiple nam in list sptit by comma python"

1

how to split an input in python by comma

lst = input().split(',')#can use any seperator value inside '' of split
print (lst)
#given input = hello,world
#output: ['hello', 'world']
#another example 
lst = input().split(' ; ')#can use any seperator value inside '' of split
print (lst)
#given input = hello ; world ; hi there
#output: ['hello', 'world', 'hi there']
Posted by: Guest on July-06-2020

Code answers related to "mutiple nam in list sptit by comma python"

Python Answers by Framework

Browse Popular Code Answers by Language