标签:变化 pre assert def try pass 登录失败 else usr
count = 0 ile count < 101: temp = 0 temp = count % 2 if temp == 0: print(count) else: pass count = count + 1
count = 0 while count < 10: if count == 7: count = count + 1 continue print(count) count = count + 1
#!/usr/bin/env python # -*- coding:utf8 -*- # 永远等待,直到用户输入了值,就会将输入的值赋值给 n,n代指用户输入的内容 # 变量 """ n1 = input(‘请输入用户名:‘) n2 = input(‘请输入密码:‘) print(n1) print(n2) """ # 变量,n1代指某一个变化的值 """ n1 = "alex" n2 = "root" print(n1) print(n1) print(n2) """ """ # 变量,只能由 字母 数字 下划线 特例:不能用数字开头 Python关键字,也不能使用 ‘and‘, ‘as‘, ‘assert‘, ‘break‘, ‘class‘, ‘continue‘, ‘def‘, ‘del‘, ‘elif‘, ‘else‘, ‘except‘, ‘exec‘, ‘finally‘, ‘for‘, ‘from‘, ‘global‘, ‘if‘, ‘import‘, ‘in‘, ‘is‘, ‘lambda‘, ‘not‘, ‘or‘, ‘pass‘, ‘print‘, ‘raise‘, ‘return‘, ‘try‘, ‘while‘, ‘with‘, ‘yield # Python的内置函数或类 user_id = "128979812308023478124" """ """ n1 = input("请输入用户名:") n2 = input("请输入密码:") if n1 == "root" and n2 == "root!23": print("登录成功") else: print("登录失败") """ import time count = 0 while count < 10: print(count) # count = 100 count = count + 1 print(123)
标签:变化 pre assert def try pass 登录失败 else usr
原文地址:https://www.cnblogs.com/lihao369/p/9906097.html