Shares
print sharing button Print
twitter sharing button Tweet
facebook sharing button Share
whatsapp sharing button Share
pinterest sharing button Pin
email sharing button Email
messenger sharing button Share
meneame sharing button Share
arrow_left sharing button
arrow_right sharing button
 Krivalar Tutorials 
Krivalar Tutorials

Python - Output



<Input    If >







  • Python provides many built-in functions for our use. The most common function used to interact with the output console is the print() function.
  • The print() function is used to display the text on the output screen.
  • This print() function will print all values or messages as a string.
  • If the values are not already a string then that value will be automatically converted to a string within the print() function.

Example with print()

>>print('Welcome to Krivalar Tutorials')
Welcome to Krivalar Tutorials
>>

Another example

>>a=5
>>print('The Given number is:',a)
The given number is: 10
>>

If you want to write multiple variables(even in different types) within the print() function, those variables are separated by a comma.

For example
>>x ='Arun'
>>y = 30
>>print(x,y)
Arun  30

To get more readable and interesting output, the python print() function allows us to use several formatting options inside the print() function.

<Input    If >





















Searching using Binary Search Tree