- 博客(5)
- 收藏
- 关注
转载 Django note.1 web框架
Django web框架(学习笔记) 创建项目 在cd到代码目录运行命令: django-admin startproject testapp 创建testapp目录 同时会创建出以下文件: testapp/ manage.py testapp/ __init__.py settings.py urls.py ...
2019-09-06 16:22:00 106
转载 Python note.4分支、循环、条件、枚举
第六章 分支、循环、条件与枚举 什么是表达式 C语言的定义: 表达式(Expression)是运算符(operator)和操作数(operand)所构成的序列 a = 1 b = 2 c = 3 a or b and c 1 c = int('1') + 2 print c 3 1 or 2 1 1 and 3 3 a or b and c#与下面下同 a or (b and c) c ...
2019-09-05 21:23:00 119
转载 python note3.运算符
定义变量时,不需要定义类型,即动态语言特性 a = [1,2,3] b = a a[0] = '1' #a[0]相当于[1,2,3][0]='1 print b ['1', 2, 3] a = 1 b = a a = 3 print b 1 int str tuple元组(不可改变)值类型 list set dict(可变)引用类型,所以不同 把type当作变量 的一些问题 type =...
2019-09-05 21:22:00 172
转载 python note2.列表 集合 元组等
序列共有操作 接上 len([1,2,3,4,5,6]) 6 len('hello world') 11 max([1,2,3,4,5,6]) 6 min([1,2,3,4,5,6]) 1 max('hello world') 'w' min('helloworld') 'd' ord('w')#查看ascll 119 ord('d') 100 集合set 特点:无序 不重复 typ...
2019-09-05 21:21:00 119
转载 python note1.简单定义,数据类型
print 'hello' hello 字符串定义 总共79个字符 # 三个引号 '''hello world''' 'hello world' # \n 表示空格 """hello world\nhello world""" 'hello world\nhello world' """ hello world hello world """ '\nhello world\nhello ...
2019-09-05 21:19:00 165
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人