码迷,mamicode.com
首页 >  
搜索关键字:choice    ( 840个结果
Python3——数学标准库使用
import random print(random.randint(1,9)) #随机数 每次取出一个 1-9 print(random.choice(['a','b','c'])) #随机取出一个字母 # 更多math库函数请参考:https://docs.python.org/3/librar ...
分类:编程语言   时间:2019-12-26 13:25:05    阅读次数:84
Python之模块
1. math 数学模块 import math ceil:向上取整 floor:向下取整 pow:幂运算 sqrt:开平方运算 fabs:绝对值 fsum:求和 modf:将一个数拆分成整数和小数部分,组成元组 copysign:将第二个参数的正负号拷贝给第一个 pi:圆周率常数 2. pickl ...
分类:编程语言   时间:2019-12-25 20:15:05    阅读次数:119
模块之-random(随机模块)
模块之-random(随机模块) random #shuffle 洗牌功能 >>> i=[1,2,3,4,5,6] >>> random.shuffle(i) >>> random.shuffle(i) >>> i [2, 5, 6, 1, 3, 4] #uniform 就是在random.rand ...
分类:其他好文   时间:2019-12-24 09:52:42    阅读次数:72
ModelForm
ModelForm 使用: 在视图函数类定义一个类,记住一定要继承ModelForm,在这个类中在写另一个原类Meta(规定的 注意首字母大写) Model.py html ...
分类:其他好文   时间:2019-12-22 12:36:46    阅读次数:91
【leetcode】1289. Minimum Falling Path Sum II
题目如下: Given a square grid of integers arr, a falling path with non-zero shifts is a choice of exactly one element from each row of arr, such that no t ...
分类:其他好文   时间:2019-12-15 10:26:34    阅读次数:108
random模块 os模块
# random# import random# random.random() # 大于0且小于1之间的小数# random.randint() # 大于等于1且小于等于3之间的整数# random.randrange() # 大于等于1且小于3之间的整数# random.choice([1,'2 ...
分类:其他好文   时间:2019-12-13 21:50:27    阅读次数:95
Python用list和dict实现简单的用户管理系统(增、删、改、查)
#更新用户ID数组 def updateUserIDs(): global userIds userIds = [] for i in userList: userIds.append(i['id']) #添加用户 def addUser(): print('当前用户编号:') print(user ...
分类:编程语言   时间:2019-12-13 20:06:53    阅读次数:99
Django-orm高级
ORM字段 orm常见字段 https://www.cnblogs.com/liuqingzheng/articles/9627915.html choice字段注释与数据渲染 性别 自定义字段 modles基表 modles里面的表有公共字段,可以提取到基表上 基表注意 设置内嵌meta类的abs ...
分类:其他好文   时间:2019-12-11 21:35:31    阅读次数:109
python3 获取当前日期的时间戳,以及n天后的日期时间戳
输出 参考: https://www.cnblogs.com/strivepy/p/10436213.html https://www.cnblogs.com/jfl-xx/p/8024596.html https://www.runoob.com/python/func-number-choice ...
分类:编程语言   时间:2019-12-06 17:34:38    阅读次数:402
Django大纲
Django框架 ........ "2.聚合查询 分组 F与Q查询 字段 及其 参数" "数据库的三大范式" "3.orm查询优化 MTV与MVC模型 choice参数 ajax serializers" "mysql取消严格模式" "4.Sweetalert bulk_create批量插入数据 ...
分类:其他好文   时间:2019-12-06 14:02:51    阅读次数:106
840条   上一页 1 ... 8 9 10 11 12 ... 84 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!