摘要: 字符串操作 阅读全文
posted @ 2016-10-31 00:03 小忍者 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 基本数据类型介绍 int(整形):2 5 40 long(长整形):11111112223344400 float(浮点):5.0 complex(复数): 布尔值:0(假),1(真) 字符串:“hello world” 阅读全文
posted @ 2016-10-29 23:12 小忍者 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 变量:存储程序运行时的临时数据 python 变量的命名规则: 变量名只能是字母,数字,下划线的任意组合。 1.数字不能开头 2.支持大小写或者下划线 3.特殊字符不能使用 4.变量名不能用空格 5.关键字不能被命名为变量名 eg:['and','if','else','continue','def 阅读全文
posted @ 2016-10-29 14:33 小忍者 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python# -*- coding:utf-8 -*-count = 0flag = 0#提示用户需要做什么操作option = int(input("提示:数字1为注册用户,数字2为登录系统,请选择:"))if option == 1: user = input(" 阅读全文
posted @ 2016-10-27 23:28 小忍者 阅读(448) 评论(1) 推荐(0) 编辑