Apr-21-2020, 03:05 PM
I'm new to Python; from a tutorial I got the following lesson for beginners:
"By default, each print statement prints text in a new line. If we want multiple print statements to print in the same line, we can use the following code:"
print("hello", end="")
Print("world")
print(Hello", end=" ")
Print("World")
but when I run the code, I get the following:
helloTraceback (most recent call last):
File "D:/Python/April 21 2020/3.py", line 2, in <module>
Print("world")
NameError: name 'Print' is not defined
Can anyone guide what is the problem?
"By default, each print statement prints text in a new line. If we want multiple print statements to print in the same line, we can use the following code:"
print("hello", end="")
Print("world")
print(Hello", end=" ")
Print("World")
but when I run the code, I get the following:
helloTraceback (most recent call last):
File "D:/Python/April 21 2020/3.py", line 2, in <module>
Print("world")
NameError: name 'Print' is not defined
Can anyone guide what is the problem?