上一页 1 ··· 344 345 346 347 348 349 350 351 352 ··· 375 下一页
摘要: 网络回话:通俗讲是网络参数配置的清单,可以根据不同的使用环境切换网络参数配置。 以下实验使用一台虚拟机完成,PC1主机名: 1、查看网卡信息 [root@PC1 ~]# nmcli connection show NAME UUID TYPE DEVICE eno16777728 d6f581bd- 阅读全文
posted @ 2020-12-19 10:35 小鲨鱼2018 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1、永久排序 >>> test1 = ["ccc","ddd","aaa","bbb"] >>> test2 = test1[:] >>> test1 ['ccc', 'ddd', 'aaa', 'bbb'] >>> test2 ['ccc', 'ddd', 'aaa', 'bbb'] >>> te 阅读全文
posted @ 2020-12-19 00:24 小鲨鱼2018 阅读(910) 评论(0) 推荐(0) 编辑
摘要: >>> test1 = ["aaa","bbb","aaa","ccc","aaa","aaa","ddd","aaa","ccc"] >>> test1.index("aaa") ## 返回元素的首个索引 0 >>> test1.index("bbb") 1 >>> test1.index("c 阅读全文
posted @ 2020-12-19 00:08 小鲨鱼2018 阅读(2144) 评论(0) 推荐(0) 编辑
摘要: >>> test1 = ["aaa","bbb","aaa","aaa","ccc","ccc","ddd","aaa","ddd","eee","ddd"] >>> test1.count("aaa") ## 统计指定元素出现的次数 4 >>> test1.count("bbb") 阅读全文
posted @ 2020-12-18 23:33 小鲨鱼2018 阅读(3781) 评论(0) 推荐(0) 编辑
摘要: >>> test1 = ["aaa","bbb","ccc","ddd","eee","fff"] >>> test2 = ["ddd","eee","fff","ggg","hhh","iii"] >>> test3 = test1 + test2 >>> test3 ['aa 阅读全文
posted @ 2020-12-18 22:20 小鲨鱼2018 阅读(934) 评论(0) 推荐(0) 编辑
摘要: >>> test1 = ["aaa","bbb","ccc","aaa","aaa","bbb","ddd","eee"] >>> test2 = [] >>> for i in test1: if i not in test2: test2.append(i) >>> test2 ['aaa', 阅读全文
posted @ 2020-12-18 21:52 小鲨鱼2018 阅读(747) 评论(0) 推荐(0) 编辑
摘要: >>> test1 ['aaa', 'bbb', 'ccc'] >>> "aaa" in test1 True >>> "ddd" in test1 False >>> "ccc" in test1 True >>> "ddd" not in test1 True >>> "aaa" not in 阅读全文
posted @ 2020-12-18 21:27 小鲨鱼2018 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1、基本用法 >>> test1 = ["aa","bb","cc","dd","ee","ff"] >>> type(test1) <class 'list'> >>> len(test1) 6 >>> test1[0:3] ## 不包含索引为3的元素 ['aa', 'bb', 'cc'] >>> 阅读全文
posted @ 2020-12-18 20:58 小鲨鱼2018 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 1、循环 >>> test1 = ["aa","bb","cc","dd","ee","ff","gg"] >>> test1 ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg'] >>> test2 = [] >>> test2 [] > 阅读全文
posted @ 2020-12-18 20:40 小鲨鱼2018 阅读(1001) 评论(0) 推荐(0) 编辑
摘要: 1、for循环 >>> test1 = ["aa","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn"] >>> type(test1) <class 'list'> >& 阅读全文
posted @ 2020-12-18 20:14 小鲨鱼2018 阅读(2400) 评论(0) 推荐(0) 编辑
上一页 1 ··· 344 345 346 347 348 349 350 351 352 ··· 375 下一页