How to input a tuples in python | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

How to input a tuples in python

10th Apr 2018, 2:03 AM
Vikas Maurya
Vikas Maurya - avatar
2 Antworten
+ 2
You could do something like a = tuple(int(x) for x in a.split(",")) Details: https://stackoverflow.com/questions/20482406/create-a-tuple-from-an-input-in-JUMP_LINK__&&__python__&&__JUMP_LINK
10th Apr 2018, 3:09 AM
­čôłSmileGoodHope­čôł
­čôłSmileGoodHope­čôł - avatar
0
print(tuple(input().split(',')))
19th Apr 2018, 9:51 PM
FranchuFranchu
FranchuFranchu - avatar