day10 18:10——18:45

-#/usr/bin/ubv python 头部对于加了解释器路径没有用

Python2 默认 ASSCI

Python3 uf8

头部

#/usr/bin/ubv python 

#_*_coding:utf_8 _*_

中文 utf_8   3字节

gbk  2

用户登录 三次机会重试

c=0
while c<3:
user=input(">>")
pwd=input(">>")
if user=="a" and pwd=="123":
print("welcome")
break
else:
print("用户名或密码错误")
c+=1

运算符
成员操作 in not in
大写upper
int (a,base=2)转换为二进制
当前数字至少用几位二进制表示bit_length
字符串
小写low
首字母大写def capitalize()









猜你喜欢

转载自www.cnblogs.com/yikedashuyikexiaocao/p/9191093.html
今日推荐