一.变量 变量定义:Variables are used to store infomation to referrenced and manipulated in a computer program. 用于存储程序运行的中间运算结果 标识 存储 变量在程序中用一个变量名表示 变量名必须是大小写英文.数字和_的组合,且不能用数字开头 对大小写敏感 推荐小驼峰命名法,如myFirstName, myLastName 关键字不能声明为变量 在Python中,等号 = 是赋值语句,可以把任意数据类型
Python文档中有一段话: Remember that arguments are passed by assignment in Python. Since assignment just creates references to objects, there’s no alias between an argument name in the caller and callee, and so no call-by-reference per se. 我们常说参数的传递分为按值传递与按引