python添加时间
#Time : ${DATE} ${TIME}
#Author : wb
#FileName: ${NAME} .py
#Email : 945784220@qq.com
#Software: $ {PRODUCT_NAME}
#Blog:https://www.cnblogs.com/BBS2013/
#Time : 2020/5/26 21:36 #Author : wubo #FileName: login.py #Email : 945784220@qq.com #Software: PyCharm #Blog:https://www.cnblogs.com/BBS2013/ for i in range(3): _user='wb' _passwd='abc123' username=input("username:") password=input("Password:") if username == _user and password==_passwd: print("welcome %s login..."% _user) break # 跳出;中断 else: print("invalid username or passwrd") #代码重复是非常忌讳的事情 #循环loop:有限循环 和 无限循环(死循环) # for i in range(1,10,2): #步长2 # print("loop:",i) # for i in range(1, 10): # if i % 2 == 1: # %取余 # print("loop:", i) # # for i in range(100): # if i<50 and i>70: # print(i)