The same list?

Report a typo

Let's say we have a list with grades of a student:

grades = [10, 7, 8, 7, 9, 6]
id1 = id(grades)              # 41602624

Then, the student retook the last exam, and the grade became better:

grades[-1] = 9
print(grades)       # [10, 7, 8, 7, 9, 9]
id2 = id(grades)

Will id2 be the same as id1? Please write "yes" or "no" in the text field below (without the quotes).

Enter a short text
___

Create a free account to access the full topic