05 2021 档案

摘要:title: ①解决字符串的翻转 ②堆和栈的区别? >>> class Stack: def __init__(self): self.item = [] def isEmpty(self): return len(self.item)==0 def push(self,item): self.it 阅读全文
posted @ 2021-05-14 23:08 会飞的pinkPig 阅读(212) 评论(0) 推荐(0)
摘要:>>> a={x for x in 'abkckldlk' if x not in 'adc'} //求字符串中除去‘adc’字符的字符串,输出为set()类型>>> a{'l', 'k', 'b'} >>> a=[x for x in 'dkjfl ss' if x not in 'sl'] // 阅读全文
posted @ 2021-05-08 10:02 会飞的pinkPig 阅读(378) 评论(0) 推荐(0)