摘要:
>>> s='hello,world' >>> s[::-1] #分片将会从右到左进行 'dlrow,olleh' >>> s[5:1:-1] ',oll' >>> s[5:1] '' >>> 阅读全文
摘要:
>>> s = {1,2,3,4}>>> s&{1,3}{1, 3}>>> s|{11}{1, 2, 3, 4, 11}>>> s>{1,3}True>>> s.union({1,3}){1, 2, 3, 4}>>> s.union((11,22)){1, 2, 3, 4, 11, 22}>>> s 阅读全文