punct = set(u‘‘‘:!),.:;?]}¢‘"、。〉》」』】〕〗〞︰︱︳﹐?﹒ ﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏?~¢ 々‖?·ˇˉ―--′’”([{£¥‘"‵〈《「『【〔〖([{£¥〝︵︷︹︻ ︽︿﹁﹃﹙﹛﹝({“‘-—_…‘‘‘) # 对str/unicode filterpunt = lambda s: ‘‘.join(filter(lambda x: x not in punct, s)) # 对list filterpuntl = lambda l: list(filter(lambda x: x not in punct, l))
时间: 2024-10-12 13:42:26