返回顶部

收藏

List equivalent?, same object?

更多
L1 = [1, ('a', 3)]         # same value, unique objects
L2 = [1, ('a', 3)]
print L1 == L2, L1 is L2         # equivalent?, same object?

标签:Python,List

收藏

0人收藏

支持

0

反对

0

»更多 您可能感兴趣的代码
  1. 2016-09-02 18:27:52Class inside a List by wubai
  2. 2016-09-19 09:12:04List: assign by index by wubai
  3. 2016-12-04 17:38:14List sort() Demo by 张宋付
  4. 2017-03-06 12:36:51Lists can be written as a list of comma-separated values (items) between square brackets. by 阿明娃儿
  5. 2014-05-11 09:36:14python 中如何判断list中是否包含某个元素 by 玉开Sir
  6. 2016-03-08 09:08:58Assign list to a list item by 张宋付
  7. 2016-04-23 10:16:24Concatenation ( + ) by 蟋蟀MM
  8. 2016-05-29 21:12:40List repetition by Solon.Ring
  9. 2016-08-18 13:26:40List slicing by xwz
  10. 2016-09-10 15:58:12Append multiple items to a list by 阿明娃儿
  11. 2016-10-12 16:14:02For loop for List by 张宋付

发表评论