KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This is somewhat of a simple question and I hate to ask it here, but I can't seem the find the answer anywhere else: is it possible to get multiple values from the user in one line of Python? For instance, in C I can do something like this: scanf("%d %d", &var1, &var2) . However, I can't figure out what the Python equivalent of that is. I figured it would just be something like var1, var2 = input("Enter two numbers here: ") , but that doesn't work and I'm not complaining because it wouldn't make a whole lot of sense if it did. Does anyone out there know a good way to do this elegantly and concisely?
Tags (comma-separated)
Save Edits
Cancel