摘要: #直接用while循环去除.ad l=['xuyutao.ad','wangjun.ad','liuchao.ad','liuyan1.ad'] n=0 L=[] while n < 4: A=l[n][:-3] L.insert(n,A) n=n+1 print(L) #while+定义函数去除.ad def xad(x): if x[-3:] in '.a... 阅读全文
posted @ 2018-11-27 17:40 星痕1216 阅读(259) 评论(0) 推荐(0) 编辑