I want the output value to be
jeong
si
sook
2017
when I enter jeong si wook 2017.
But there's always been a problem. why?? help me please...
name1, name2, name3, si = input("Name and School ID: ").split
print(name1 \n name2 \n name3 \n si)
I want the output value to be
jeong
si
sook
2017
when I enter jeong si wook 2017.
But there's always been a problem. why?? help me please...
name1, name2, name3, si = input("Name and School ID: ").split
print(name1 \n name2 \n name3 \n si)
I think the problem you are dealing with is you do not take input correctly. In your current approach, user has to pass a string(""), and also print() is expecting a string to be printed out.
So in order for your function to work, you need to modify your print() to print(name1 + "\n" + name2 +"\n" + name3 +"\n" +id), this will first convert the being print content to a string "name1 + \n + name2 + \n + name3 +\n +id" then outputs it.
Hope this solves your problem and confusion, good luck!
"\n" and some other "\r" etc are special instruction for output operations. "\n" means new line in this case, in your case, shouldn't it just be print("your stand input")?