python的变量:
变量命名:变量只能是字母、数字、下划线组合,并且必须以字母开头。
python的变量可以随时改变,可以直接用,不用提前定义
如:
msg=“this is a”
print(msg)
msg="this is b"
print(msg)
运行会输出
this is a
this is b
python的变量:
变量命名:变量只能是字母、数字、下划线组合,并且必须以字母开头。
python的变量可以随时改变,可以直接用,不用提前定义
如:
msg=“this is a”
print(msg)
msg="this is b"
print(msg)
运行会输出
this is a
this is b