- 1
Can we print input along with some space followed by another input and then go on
In Python!! Str=input() I need input as hi friends how are u all Like this input I want
9 Antworten
0
I don't understand your question. Please show an example code where what you want doesn't work.
I guess you don't want newline after every print? in that case set `end` keyword argument to space ' ' or empty string ''
print('hello', end=' ')
print('world')
# hello world
0
Taking input s having space between inputs
0
Str only take input as hi but I need to take hi friends how are u all like this
Inputs followed by space
0
It's working fine for me. If I enter a single line it all gets stored in variable.
I just tried this in codeplayground
msg = input() #enter hi friends how are u all
print(msg) # prints hi friends how are u all
0
No you can't take two input in same line.
input will behave as it has \n at the end.
you can use split method of python to separate your two values after getting it as a single input
0
I didn't mean that 🇮🇳Omkar🕉
I told that input will behave like as if \n is at its end
Yes I had written in bit wrong way sorry for that 🙏
0
It's okay thank you all
0
丹ⓨㄩک廾 Ok. That's fine.