python基础:变量

python的变量:

变量命名:变量只能是字母、数字、下划线组合,并且必须以字母开头。

python的变量可以随时改变,可以直接用,不用提前定义

如:

   msg=“this is a”

print(msg)

msg="this is b"

print(msg)

运行会输出

this is a

扫描二维码关注公众号,回复: 2426453 查看本文章

this is b

猜你喜欢

转载自blog.csdn.net/u011498011/article/details/81204806