判断题
偏易
#18341
执行下面Python代码后,输出两个True。 lst1 = [ 1 , 2 , 3 ] lst2 = lst1 [ : ] print ( lst1 == l…
执行下面Python代码后,输出两个True。
答案与解析
正确答案:错
解析
lst1 == lst2为True(内容相同),但lst1 is lst2为False(不同对象),所以输出True和False。