Write a python program to generate a list and tuple with comma-separated numbers

Write a python program to generate a list and tuple with comma-separated numbers

values = input("Input some comma seprated numbers : ")
list = values.split(",")
tuple = tuple(list)
print('List : ',list)
print('Tuple : ',tuple)

Result

Write a python program to generate a list and tuple with comma-separated numbers
Write a python program to generate a list and tuple with comma-separated numbers

 

 

 

 

 

 

 

Leave a Comment