上一页 1 ··· 42 43 44 45 46
摘要: count=0 while True: print('count:',count) count+=1 # count=count+1 if count==500: break#结束整个循环 阅读全文
posted @ 2018-01-03 09:09 耐烦不急 阅读(119) 评论(0) 推荐(0) 编辑
摘要: _username='qi' _password='abc123' username=input("username:") password=input('password:') if _username==username and _password==password: print("welcome user {name}...".format(name=username)) els... 阅读全文
posted @ 2018-01-03 09:08 耐烦不急 阅读(193) 评论(0) 推荐(0) 编辑
摘要: #1、python2中raw_input与python3中的input是相同的,python2中也有input但是别用(不好用,忘记它) #密码是明文的 username=input("username:") password=input('password:') print(username,password) #2、密码变成密文 import getpass username=input(... 阅读全文
posted @ 2018-01-03 09:07 耐烦不急 阅读(318) 评论(0) 推荐(0) 编辑
摘要: #1(方法1)尽量不用这种拼接法,效率低下,占用内存多 name=input("name:") age=input('age:') job=input('job:') salary=input("salary:") info=''' ------- info of ''' + name +'''------- Name:''' + name +''' Age:''' + age + 阅读全文
posted @ 2018-01-02 18:00 耐烦不急 阅读(374) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*- 也可以换成下划线 用于声明文件编码,python3本身就是utf-8类型,不用声明 name="你好,世界"#utf-8格式能显示汉字而不乱码 print(name) 阅读全文
posted @ 2018-01-02 17:59 耐烦不急 阅读(805) 评论(0) 推荐(0) 编辑
摘要: ''' 多行注释(三个单引号,或者双引号) gf_of_oldboy="Chen rong hua"#变量的表示办法1,用下划线(老男孩的女朋友) GfOfOldboy="Chen rong hua"#变量的表示办法1,单词首字母用大写(老男孩的女朋友) PIE=3333 #用大写表示常量,但也能变化这个值,只是代表 ''' """ 多行注释(三个单引号,或者双引号) gf_of_oldboy=... 阅读全文
posted @ 2018-01-02 17:58 耐烦不急 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 笔记:关于python变量的定义 阅读全文
posted @ 2017-12-21 18:45 耐烦不急 阅读(278) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46