+ 1
How can I give space in the entered contents if taking user input..??
13 Respostas
+ 6
I checked your code https://code.sololearn.com/cGG83BRthfoZ/#py. It works fine. Because input always generates a string, you never have to say str(input()). input() is all you need.
+ 2
file = open("newfile.txt" , "w")
a=str(input ("Enter your Name:"))
b=str(input ("Enter your Father's Name:"))
file.write(a+b)
file.close
+ 2
Thank you sir
+ 1
you can enter multiple words separated by space in this code
x = str(input())
print(x)
+ 1
my program is like this
+ 1
and when I enter the value of a and b there no space left between them in the new.txt file which I opened
+ 1
Output is showing like this :
satyammishrakunjbiharimishra
+ 1
okay. use the following:
file.write(a, " ", b)
or file.write(a+" "+b)
+ 1
in valid
+ 1
it shows invalid
+ 1
ok ok let me check
+ 1
thanks it's working now
0
where do you want the space?
what is your expected output?