02 2018 档案
摘要:# 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):
阅读全文
摘要:# 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
阅读全文
摘要:# 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
阅读全文
摘要:# 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')#
阅读全文
摘要:# filename:python2.25(2).py# author:super# date:2018-2-25print('today to learn the zidian')# 在python中, 字典是一系列的键值对的关系, 每一个键都有一个值去对应, 你可以使用键来访问相对应的值# 与键
阅读全文
摘要:# 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
阅读全文
摘要:# 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
阅读全文
摘要:# 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
阅读全文
摘要:print("today to learn the list")# 列表由一系列按特定顺序排列的元素组成。你可以创建包含字母,0-9的数字,所有家庭成员的姓名的列表。# 鉴于列表一般都是包含很多东西的,所以名字一般是以复数形式出现, letters, digits, names 像这样的# 在pyt
阅读全文
摘要:print("today is 2018.2.22")name = 'SUPer'print('hello,'+name+' today is good or not?')# 全部都是小写 string.lower()print(name.lower())# 全部都是大写 string.upperp
阅读全文
摘要:1.下载 Django(python已安装好的前提下) Django 下载地址:https://www.djangoproject.com/download/ 2.下载 Django 压缩包,解压并和Python安装目录放在同一个根目录,进入 Django 目录 比如你的python 在D:\pyt
阅读全文