![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
乖,摸摸头จุ๊บ
这个作者很懒,什么都没留下…
展开
-
Python 函数参数
按照位置传参func1(a, b): return a+b*2test1 = func1(1,9)print(test1)运行结果:按照关键字传参def func2(a, b): return a+b*2test2 = func2(b=9,a=1)print(test2)运行结果:默认参数def func3(a, b, c = 3): ret...转载 2019-01-12 11:26:09 · 121 阅读 · 0 评论 -
常用css列表
color 设置文字的颜色,如: color:red;font-size 设置文字的大小,如:font-size:12px;font-family 设置文字的字体,如:font-family:‘微软雅黑’;font-style 设置字体是否倾斜,如:font-style:‘normal’;设置不倾斜,font-style:‘italic’;设置文字倾斜font-weight 设置文字是否...转载 2019-01-28 16:37:37 · 71 阅读 · 0 评论 -
Mac上搭建Python虚拟环境
https://blog.csdn.net/seven_zhao/article/details/79760452https://blog.csdn.net/weixin_41362649/article/details/81267870常用的基本命令1.退出当前虚拟环境$deactivate2.列出虚拟环境列表$lsvirtualenv -benv1env23.切换虚拟环境$...转载 2019-05-09 14:58:33 · 290 阅读 · 0 评论 -
笔记django
创建app,创建模板文件templates,在设置中设置模板文件路径,设置远程数据库DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'test1', 'USER': 'root', 'PASSWORD': 'mysql', ...原创 2019-05-13 15:36:04 · 68 阅读 · 0 评论 -
render() got an unexpected keyword argument 'renderer'
render() got an unexpected keyword argument ‘renderer’方案一:django 2.2.1降级到2.0.8解决方案二: 注释 93行转载 2019-05-13 15:39:18 · 404 阅读 · 0 评论 -
python中的正则表达式
通过正则表达式对字符串进行匹配,使用模块re。In [8]: # re.match("正则表达式,需要匹配的字符串")In [13]: re.match(r"nihao", "nihaoa")转载 2018-11-23 22:58:55 · 159 阅读 · 0 评论 -
随机数应用
# 随机数应用# 随机调用1-3之间的整数random.randint(1,3)In [50]: random.randint(1,3)Out[50]: 3In [51]: random.randint(1,3)Out[51]: 2In [52]: random.randint(1,3)Out[52]: 1In [53]: random.randint(1,3)Out...转载 2018-12-23 17:07:03 · 835 阅读 · 0 评论 -
字典列表常见操作
带下标索引的遍历 enumerate() 函数enumerate() 函数用于将一个可遍历的数据对象(如列表、元组或字符串)组合为一个索引序列,同时列出数据和数据下标,一般用在 for 循环当中。>>> for i,v in enumerate(l):... print(i,v)...0 11 22 33 44 5>>> for i...原创 2019-07-09 17:05:28 · 265 阅读 · 0 评论