摘要: a. 整数 int - 创建 a = 123 a = int(123) - 转换 age = "18" new_age = int(age) b. 布尔值 - 创建 a = True b = False - 转换 - 数字转换,只有0是False,其他True - 字符串, 只有""是False,其 阅读全文
posted @ 2017-05-05 20:12 Deasion 阅读(149) 评论(0) 推荐(0) 编辑
摘要: a. i += 1 b. if 1 == 1 or 1 > 2 and 1 == 4: print('正确') else: print('错误') c. content = "Alex 前几天去泰国玩姑娘,一不小心染上了病,他的内心活动是,真该多来几个" if "前几天去" in content: 阅读全文
posted @ 2017-05-05 20:11 Deasion 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1. 输入,输出 2. 条件语句 if 条件: 成功走这里 else: 失败走着 应用: import getpass name = input("请输入姓名:") pwd = getpass.getpass('请输入密码:') if name == 'deasion' and pwd == '12 阅读全文
posted @ 2017-05-05 20:10 Deasion 阅读(126) 评论(0) 推荐(0) 编辑
摘要: - 字母 - 数字(不能开头) - 下划线 - 不能使用python内置关键字 PS: 下划线分割 阅读全文
posted @ 2017-05-05 19:59 Deasion 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 最开始:英文256-> ascii :a 00000010 s 00000100 dfasd98123hksinqjkashdakls 万国码(至少16位) :a 00000000 00000010 中 10000000 00000000 00000010 文,日文。lljasdfasdfsfda 阅读全文
posted @ 2017-05-05 19:57 Deasion 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1、Python的介绍 Python是一种面向对象的解释型计算机程序设计语言,由荷兰人Guido van Rossum于1989年发明,第一个公开发行版发行于1991年。 Python是纯粹的自由软件, 源代码和解释器CPython遵循 GPL(GNU General Public License) 阅读全文
posted @ 2017-05-05 19:51 Deasion 阅读(166) 评论(0) 推荐(0) 编辑