摘要: ###1、生成随机数 生成0-1的浮点数 random.random() 生成闭区间的随机数 random.randint(a,b) ###2、字符串 字符串-切片 [起始位置:终止位置+1] desc="名称XIAOBAI" 取出"名称" res=desc[0:2] #左闭右开 取出"XIAOBA 阅读全文
posted @ 2020-10-13 22:28 shooter_w 阅读(101) 评论(0) 推荐(0) 编辑