-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexercise_6.py
More file actions
28 lines (24 loc) · 768 Bytes
/
exercise_6.py
File metadata and controls
28 lines (24 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
print(
'-----------------------------------------\n'\
'Practical python education || Exercise-6:\n'\
'-----------------------------------------\n'
)
print(
'Task:\n'\
'-----------------------------------------\n'\
'Write a Python program which accepts a sequence of comma-separated numbers from user and generate a list and a tuple with those numbers.\n'
)
print(
'Solution:\n'\
'-----------------------------------------'\
)
values = input("Input some comma separated numbers : ")
list = values.split(',')
tuple = tuple(list)
print('List : ', list)
print('Tuple : ', tuple)
print(
'\n-----------------------------------------\n'\
'Copyright 2018 Vladimir Pavlov. All Rights Reserved.\n'\
'-----------------------------------------'
)