【常量】
print(123)
:::123
print('hello’)
:::hello
保留词(不能用作定义变量):
False class return is finally None if for lambda continue true def from while nonlocal and del global not with as elif try or yield assert else import pass break except in raise
【变量】
x=123
print(x)
:::123
【运算】
+:加
-:减
*:乘
/:除
**:幂
%:余
【变量类型】
x='hello’+' '+'world’
print(x)
:::hello world
x=1+4
print(x)
:::5
x='123’
type(x)
:::<class 'str'>
y=int(x)
type(y)
:::<class 'int’>
【用户输入】
x=input('who are you')
print('hi,',x)
:::who are you
:::sam
:::hi,sam