python基础-驼峰命名法

一.驼峰命名法:

小驼峰命名法:第一个单词以小写字母开始;第二个单词的首字母大写,例如myNane,aDog

大驼峰命名法:每一个单词的首字母都采用大写字母,例如:FirstName,LastName

不过在程序员中还有一种命名法比较流行,就是用下划线来连接所有单词,例如:send_buf

二.标志符关键字

'False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 

'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']

posted on 2018-02-05 23:00  望京彭于晏  阅读(1920)  评论(0)    收藏  举报

导航