python学习

下划线:
单行下划线:在python解释器中,表示是会话中上一条的执行结果
>>> "alright"
'alright'
>>> _
'alright
循环中下划线:作为一个名称,临时性名称,名称不做使用
for _ in range(10):
do_something()
中间下划线:函数连接符.是一种函数名的命名方式,就像Java驼峰式的命名
def add_user(user):
do_something
开始下划线:以下划线_为前缀,使用from <模块/包名> import *时,以_开头的名称都不会被导入

参考:http://ddrv.cn/docs/pythonnotes/    https://zhuanlan.zhihu.com/p/36173202

Unkonw Unkonw(你不知道一样东西,你也会不知道自己不知道这样东西)
原文地址:https://www.cnblogs.com/2014-1130/p/11650678.html