This article introduces the use of print statements and strings in Python 3. See Demo.py below for an exercise

print ('Hello Python 3! Text refers to print statements and string print statements, in which messages can be enclosed in single or double quotation marks. Print ('we\'ar go to shopping.') print('we\'ar go to shopping ') Print ("Hi" + "Tom") # print("Hi" + 5) # Print (int('8') + 5) # int print(float('8.5') + 5) #Copy the code

Conclusion:

  1. Single-line comments in Python generally use #, and multi-line comments come in two varieties

‘ ‘ ‘

Note Content 1

Comment content 2 “”

Or it

“” “

Note 1

Note 2 “” “

This article is from the SDK community: www.sdk.cn