• Kurse
  • Code Compiler
  • Diskutieren
  • Preise
  • Teams
Menu
+ 1

How to input a tuples in python

swifttuplespython3
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

Häufig solche Fragen?

Effizienter lernen, kostenlos:

  • Einführung in Python

    7.1M Lernende

  • Einführung in Java

    4.7M Lernende

  • Einführung in C

    1.5M Lernende

  • Einführung in HTML

    7.5M Lernende

Alle Kurse anzeigen
Heute heiß
Problem with Javascript function
0 Votes
How can I print a Python set so it looks clean (no {} brackets or quotes)?
2 Votes
Can someone help and explain better on slicing
1 Votes
Where make_unique is better than unique_ptr(raw pointer)
0 Votes
How do I remove duplicates from a list but keep the order?
0 Votes
About css...
0 Votes
How do I print a multiplication table neatly?
0 Votes
Why we use return in function ?
0 Votes
Is there anyone who is working on algo bot (trading bot)
0 Votes
Course
1 Votes