摘要: # filename:python3.1.py# author:super# date:2018-03-01# with open(r'd:\test\test.txt') as file_object:# content = file_object.read()# print(content.rs 阅读全文
posted @ 2018-03-01 09:25 super-JAVA 阅读(119) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.28.py# author:super# date:2018-2-28class Dog(object): def __init__(self, name, age): self.name = name self.age = age def sit(self): 阅读全文
posted @ 2018-02-28 09:35 super-JAVA 阅读(164) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.27.py# author:super# date:2018-2-27def hello_to_others(names): for i in names: print('hello, ' + i)namelist = ['aa', 'bb', 'cc']hel 阅读全文
posted @ 2018-02-27 08:56 super-JAVA 阅读(110) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.26(2).py# author:super# date:2018-2-26print('today to learn the function')def hello(username): print('hello, world '+username)def p 阅读全文
posted @ 2018-02-27 08:24 super-JAVA 阅读(157) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.26.py# author:super# date:2018-2-26# name = input('what is u name?')# print('my name is '+name)## age = input('what is your age')# 阅读全文
posted @ 2018-02-26 09:06 super-JAVA 阅读(140) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.25(2).py# author:super# date:2018-2-25print('today to learn the zidian')# 在python中, 字典是一系列的键值对的关系, 每一个键都有一个值去对应, 你可以使用键来访问相对应的值# 与键 阅读全文
posted @ 2018-02-25 15:55 super-JAVA 阅读(198) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.25.py# author:super# date:2018-2-25print('''today to learn the list's function''')plays = ['aa', 'bb', 'cc', 'dd', 'ee']print(plays 阅读全文
posted @ 2018-02-25 13:52 super-JAVA 阅读(358) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.24(2).py# author:super# date:2018-2-24# 使用for打印出一个Listprint('today to learn the ')names = ['aa', 'bb', 'cc']for i in names: print(i 阅读全文
posted @ 2018-02-24 22:52 super-JAVA 阅读(201) 评论(0) 推荐(0) 编辑
摘要: # filename:python2.24.py# author:super# date:2018-2-24print('today to learn how to add/delete/change the list')# 学习list的append, insert, del, remove, p 阅读全文
posted @ 2018-02-24 09:34 super-JAVA 阅读(139) 评论(0) 推荐(0) 编辑
摘要: print("today to learn the list")# 列表由一系列按特定顺序排列的元素组成。你可以创建包含字母,0-9的数字,所有家庭成员的姓名的列表。# 鉴于列表一般都是包含很多东西的,所以名字一般是以复数形式出现, letters, digits, names 像这样的# 在pyt 阅读全文
posted @ 2018-02-23 19:59 super-JAVA 阅读(130) 评论(0) 推荐(0) 编辑