How To Display Values In Python?

Share Your Love

Output Variables:

The print statement is used to print values in console.

The combination between text and variable to print at a time we use +.

x = "awesome"
print("Python is " + x)

The output is:

Python is awesome

You can also use + character to add two integers like,

x = 5
y = 6
z = x + y
print("Addition is "+ z)

The output is,

Addition is 11

The above code type is same but if type is different then it generates error, like

x = "awesome"
y = 5
print(x + 5)

Please write comments or WhatsApp if you find anything incorrect, or you want to share more information about the topic discussed above.

Share Your Love
Avatar photo
Lingaraj Senapati

Hey There! I am Lingaraj Senapati, the Founder of lingarajtechhub.com My skills are Freelance, Web Developer & Designer, Corporate Trainer, Digital Marketer & Youtuber.

Articles: 429

Newsletter Updates

Enter your email address below to subscribe to our newsletter