1、Python3不需加utf-8,Python必须加utf-8
2、单行注释用#,多行注释用""" """
3、变量:只能由字母、数字、下划线组成、不能用数字开头、Python关键字不能使用、Python内置函数或类
4、基本数据类型:
字符串 n1 = "alex"
数字 age = 21
加减乘除:
n1 = 'alex'
n2 = 'sb'
n3 = n1 + n2
print(n3) #alexsb
print(n3*3) #alexsbalexsbalexsb
n1 = 10
n2 = 2
n3 = n1 - n2
n4 = n1 * n2
n5 = n1 / n2
n6 = n1 % n2
n7 = n1 ** n2
n8 = n2 ** n1
print(n3) #8
print(n4) #20
print(n5) #5.0
print(n6) #0
print(n7) #100
print(n8) #1024