ID = python_std_00
Topic
Similarities and Differences bwtween C and Python
Study record
分类 | C | Python3 | 说明 |
---|---|---|---|
引用 | include | import | Python可以用 from import 引用某些函数,C不能 |
代码块 | {} | ‘:’+ 缩进 | 最大区别 Python 的代码块用相同数目的行首缩进空格数 来控制 |
单行注释 | // | # | |
多行注释 | * notes * | ‘’’ notes ‘’’, “”" notes “”" | 也可用于单行注释 |
string | " " | ’ ', " “, “”” “”" | python is more flexible |
语句结束符 | ; | null | very different |
运算符优先级 | see[1] | quite different | |
一段代码多行显示 | \ | \ | same |
一行显示多条语句 | ; | ; | same |
more to be added…
Reference
[1] Python3 运算符