python3
l小痞子l
工程师
展开
-
Python基本数据类型
数据类型 说明 int 整形 str 字符串 bool 布尔 list 列表 truple 元祖 dict 字典原创 2019-03-19 17:53:38 · 156 阅读 · 0 评论 -
Python - 字符串格式化
Python的字符串格式化有两种方式:百分号方式、format方式 百分号的方式相对来说比较老,而format方式则是比较先进的方式,企图替换古老的方式,目前两者并存。[PEP-3101] This PEP proposes a new system for built-in string formatting operations, intended as a replacement fo...原创 2019-03-25 15:14:59 · 141 阅读 · 0 评论 -
隐藏输入的密码 getpass模块
#注意:getpass不能在pycharm里面使用,会卡住. importgetpass passwd = getpass.getpass('Pleaseinputyourpassword:') getpass.getuser() #返回用户的登录名,适用于:Unix, Windows ...原创 2019-03-18 17:33:39 · 276 阅读 · 0 评论