摘要:
s='esrddddddddddfhhhhhhhg's1 ='ERTYWERTY45RTY's2 = ['1', '3', 'w', 's', '5', '9']t = s1.lower()#全部转成成小写t1 = s.upper() #全部转换成大写t2 = s.capitalize()#首字母大 阅读全文
摘要:
class Stack(): def __init__(self,len): self.stack =[] self.len = len def __repr__(self):#方便查看对象属性 return str(self.stack)# 需要返回字符串 def push(self,elemen 阅读全文
摘要:
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 阅读全文