摘要: s='esrddddddddddfhhhhhhhg's1 ='ERTYWERTY45RTY's2 = ['1', '3', 'w', 's', '5', '9']t = s1.lower()#全部转成成小写t1 = s.upper() #全部转换成大写t2 = s.capitalize()#首字母大 阅读全文
posted @ 2019-09-06 11:04 未来全栈攻城狮 阅读(225) 评论(0) 推荐(0) 编辑
摘要: class Stack(): def __init__(self,len): self.stack =[] self.len = len def __repr__(self):#方便查看对象属性 return str(self.stack)# 需要返回字符串 def push(self,elemen 阅读全文
posted @ 2019-08-27 10:11 未来全栈攻城狮 阅读(486) 评论(0) 推荐(0) 编辑
摘要: list=[1, 2, 3, 4,'a','b','c','a',2, 3, 2,"b",'c','d','e','f','d']# s = set(list)#用set方法# print(s)s =[]for i in list: #列表去重 if i not in s: s.append(i)l 阅读全文
posted @ 2019-08-24 17:31 未来全栈攻城狮 阅读(1426) 评论(0) 推荐(0) 编辑