How to print a statement in Python?
Printing in Python means displaying a message (i.e. text, number, message etc.) on the screen. The syntax for the print() function is print("statement"). Inside the double or single quote, you have to type the text (i.e. your message) to print it on the screen. Either double or single quotes can be used to print the message on the screen. Example,
Using print function with double quotes
Input:
Using print function with single quotes
Input:
Also note that the print() function works with print typed in lowercase only. This function will not work if the print is written in other text case (other than the lowercase) such as Print or pRINT or PRINT. Doing so will result in an error.
Using print function with different text cases
Input:
pRINT('Welcome to vs.eyeandcontacts.com!')
PRINT('Welcome to vs.eyeandcontacts.com!')
No comments:
Post a Comment