even = [10, 4, 6, 8]
another_even = list(even)
print(another_even is even)
if another_even == even:
another_even.sort( reverse=True )
print(even)
else:
print("Yay")
Output: False
[10, 4, 6, 8]
Even though I have created two seperate list then why the if condition is true.
Aucun commentaire:
Enregistrer un commentaire