0

How to give a newline in this input function??

alot confused

13th Jun 2018, 4:18 AM
Ayush Bhushan
Ayush Bhushan - avatar
3 Respuestas
+ 7
Just use \n for the new line. ste = input("Enter a Word \n") print(ste)
13th Jun 2018, 4:22 AM
Akash Pal
Akash Pal - avatar
+ 6
You can import fileinput package to do that. You have to give every input in a new line. Try this:- import fileinput for line in fileinput.input(): print(line) Fileinput Infomation :- https://docs.python.org/2/library/fileinput.html
13th Jun 2018, 4:44 AM
Akash Pal
Akash Pal - avatar
0
suppose i want my output as enter a word: ayush bhushan
13th Jun 2018, 4:36 AM
Ayush Bhushan
Ayush Bhushan - avatar