Python - list VS tuple, list() VS []
摘要:
差异一:list可变 vs tuple不可变 列表是动态的,长度大小不固定,可以随意地增加、删减或者改变元素(mutable)。 而元组是静态的,长度大小固定,无法增加删减或者改变(immutable)。 # Jupyter格式 tup = (1, 2, 3, 4) new_tup = tup + 阅读全文
posted @ 2023-07-14 17:35 frank_cui 阅读(46) 评论(0) 推荐(0)
浙公网安备 33010602011771号