0

end = '\n' within input() functions

Is it possible to include a , end = '\n' output within an input() in Python? Or just incorporating \n in any way within strings inside the function.

21st Dec 2019, 11:00 PM
Alex Traynor
2 ответов
+ 4
If you want to create a new line in the text prompting for the input, you can't use 'end = ' as input has no parameter of that sort. Or if you want to take multiline input: import sys text = sys.stdin.readlines() print(text) use Ctrl + d when you finish typing the input. It returns a list of the text in each line.
22nd Dec 2019, 4:14 PM
XXX
XXX - avatar
0
Are you trying to do a multi-line input or are you trying to create a new line in the input prompt?
22nd Dec 2019, 12:09 AM
rodwynnejones
rodwynnejones - avatar