• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

How to input a tuples in python

swifttuplespython3
10th Apr 2018, 2:03 AM
Vikas Maurya
Vikas Maurya - avatar
2 Answers
+ 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

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Which is easier to learn first between python and JS?
0 Votes
Does sololearn teaches on how to create games
0 Votes
Excuse me, why do they always ask us to input without telling us what it is for in python.
2 Votes
Sockets, etc
0 Votes
Quiz
0 Votes
I HAVE A PROBLEM I CANNOT ABLE TO SEND MESSAGE ANYONE AND ALSO MY MESSAGE SECTION NOT AVAILABLE "PLEASE ACTIVATE YOUR ACCOUNT
0 Votes
NecesitĂł ayuda
1 Votes
Any Sololearn Chat Groups that I could Join?
0 Votes
Controls issue
0 Votes
Table tags on html
0 Votes