think python chapter2
2016-04-10 17:21
501 查看
1、An assignment statement creates a new variable and gives it a value:
Variable names can be as long as you like. They can contain both letters and numbers, but they can’t begin with a number. It is legal to use uppercase letters, but it is conventional to use only lower case for variables names.
The underscore character, , can appear in a name. It is often used in names with multiple words。
2、An expression is a combination of values, variables, and operators. A value all by itself is considered an expression
3、A statement is a unit of code that has an effect, like creating a variable or displaying a value.
When you type a statement, the interpreter executes it, which means that it does whatever the statement says. In general, statements don’t have values.
Variable names can be as long as you like. They can contain both letters and numbers, but they can’t begin with a number. It is legal to use uppercase letters, but it is conventional to use only lower case for variables names.
The underscore character, , can appear in a name. It is often used in names with multiple words。
2、An expression is a combination of values, variables, and operators. A value all by itself is considered an expression
3、A statement is a unit of code that has an effect, like creating a variable or displaying a value.
When you type a statement, the interpreter executes it, which means that it does whatever the statement says. In general, statements don’t have values.
相关文章推荐
- Python os模块
- think python chapter3
- ubuntu中用python把文件的编码改成utf8
- [python]使用txt保存和读取列表变量
- python中的错误处理
- python 装饰器和 functools 模块
- python对robotframework测试概要信息报告发送邮件的方法
- Python学习笔记第一天
- (python解析js)scrapy结合ghost抓取js生成的页面,以及js变量的解析
- 基于python和mysql的查询操作
- selenium+python send_keys() 上传文件
- python列出指定文件夹下所有给定后缀名的文件
- python:mysql查询
- python --yield
- 解析python中的类:
- 【python日常一】使用python抓取拉勾网职位信息并做简单统计分析
- python错误汇总3:安装MySQLdb时:EnvironmentError: mysql_config not found
- 一、Python 进阶 之 函数式编程
- caffe用python时可能需要的模块安装
- python中隐式的内存共享