DEV Community

Discussion on: Immutable vs Mutable Data Types in Python

Collapse
 
lorrli274 profile image
Lorraine

No, they would not have the same ID - take a look at this example in which a string '1' is converted to an integer 1 next.tech/projects/e7c86bfc750b/share. As you can see, the IDs for the two are different!

Let me know if you have any other questions! :)