[Question] <zip object at 0x7f8b7f83cd08>?

Hi fellow students,

I have a quick question.

I’m just curious about what 0x7f8b7f83cd08 indicates or means from a zip object return value such as <zip object at 0x7f8b7f83cd08>.

I feel like understanding what this means can enhance my fundamentals of coding <- does this make sense?

https://docs.python.org/3/library/functions.html#id

3 Likes

ionatan! Thank you for your reply.

However, I have a further question. if 0x7f8b7f83cd08 is an id of object, when I run the below code, shouldn’t I get “zip object at 139686368984072” instead of ‘zip object at 0x7f0b44673c08’?

lst=[5, 2, -10, -4, 4, 5]
lst1=[1]
a=zip(lst,lst1)
print(a)
print(id(a))

<zip object at 0x7f0b44673c08>
139686368984072

1 Like
2 Likes
print(hex(139686368984072))

Output:

0x7f0b44673c08
print(0x7f0b44673c08)

Output:

139686368984072
1 Like

Thank you!!! ionatan and appylpye!!!

everything is so clear now!!

1 Like