Created
July 15, 2018 14:05
-
-
Save solen003/4d294ee5c39b175dabb16299096ae986 to your computer and use it in GitHub Desktop.
Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. Suppose the following input is supplied to the program: 34,67,55,33,12,98 Then, the output should be: ['34', '67', '55', '33', '12', '98'] ('34', '67', '55', '33', '12', '98')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers = input("Type in numbers seperated only by a comma :") | |
numbers_split = numbers.split(',') | |
number_tuple = tuple(numbers_split) | |
print(number_tuple) | |
print(numbers_split) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment