How to give a newline in this input function?? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How to give a newline in this input function??

alot confused

13th Jun 2018, 4:18 AM
Ayush Bhushan
Ayush Bhushan - avatar
3 Antworten
+ 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