Answers for "tuple in python for user input"

0

python create tuple from input

t = input()
a = tuple(int(x) for x in t.split())
#view this tuple
print(a)
Posted by: Guest on May-20-2020
0

python user input to tuple

tuple(int(x.strip()) for x in raw_input().split(','))
Posted by: Guest on May-20-2020

Python Answers by Framework

Browse Popular Code Answers by Language