0
Anyone explain me please
input: 'python is fun' output: None Unless I put "print",I got non for the output.Why it is like that?
4 Answers
+ 4
Your question would be easier to answer if we actually saw the code that converts input to output. What are you trying to do? Do you get no output or do you actually get 'None' as output?
+ 2
a = "python is fun"
print(a)
+ 2
You are using the wrong syntax. Go back to the basics and follow some tutorial to catch up! (Or maybe i got your question wrong?)
To answer your question: print is a function that takes your string (aka 'python is weired') as an argument and prints it to the output (aka console). Without it, the machine does not know what you want to do with the data.
Happy coding!
By the way: try to use more descriptive titles for questions (like 'python output is none')
+ 1
thank you guys