会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
泡面小网管
只会泡泡面个装系统的小网管。
2019年5月9日
python 列表中的数字转为字符串
摘要: 1. list1 = [1,2,3,4,5] list1 = [ str(x) for x in list1 ] 2. list1 = [1,2,3,4,5] list1 = list(map(str,list1))
阅读全文
posted @ 2019-05-09 11:33 泡面小网管
阅读(1350)
评论(0)
推荐(0)
python 排列组合
摘要: import itertools#排列list1 = list(itertools.permutations([1,2,3,4,5,6],2))# print(list1)print(len(list1))# list2 = itertools.permutations([1,2,3,4,5,6],
阅读全文
posted @ 2019-05-09 09:46 泡面小网管
阅读(191)
评论(0)
推荐(0)
filter函数
摘要: list1 = [1,2,3,4,5,6,7,8,9,12,31,21,21]def fun1(num): if num % 2 == 0: return True return Falselist2 = filter(fun1,list1)print(list(list2))#filter函数中两
阅读全文
posted @ 2019-05-09 09:45 泡面小网管
阅读(285)
评论(0)
推荐(0)
导航
博客园
首页
新随笔
联系
订阅
管理
公告