2018年8月30日
摘要: 1.校验用户名是否存在 users = ['nhy','hhh'] for i in range(5): username = input('请输入用户名:') #如果用户不存在,说明可以注册, #if users.count(username)>0: in username in users:#i 阅读全文
posted @ 2018-08-30 23:28 爱吃爱吃桃子 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 增 1)append:添加元素。添加到最后一位。 stu_name = ['张三','李四','王五','。。。',1,1.5] stu_name.append('赵六')#list里面添加元素。添加到最后一位。 print(stu_name) 2)insert:插入到指定位置。 stu_name 阅读全文
posted @ 2018-08-30 22:59 爱吃爱吃桃子 阅读(352) 评论(0) 推荐(0) 编辑