So, say I have to take 3 inputs from the user (name, age, location):
Jim Halpert
30
Scranton
and I write the code as follows:
name = input()
age = input()
location = input()
Now, instead of typing them one by one, I just copy and paste them from a text file, but when I paste them into the console they are not read as separate inputs. In fact, they are shown as follows:
Jim Halpert
...: 30
...: Scranton
My question is: Is there any way I can make Spyder read them as separate inputs? Thank you for your help.
Read more here: https://stackoverflow.com/questions/65712131/pasting-multiiple-lines-read-as-single-line-inputs-into-spyder-console
Content Attribution
This content was originally published by Tarabas Zaratin at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.