I was talking with a friend, comparing languages, and he mentioned that Java\'s automated memory management is superior to Python\'s as Java\'s does compaction, while Python
I don't know for sure, but CPython uses reference counting and its objects use memory addresses as ids so I would say it does not do compaction... And according to this, "[C]Python does not use memory compaction ... [w]ould Python use memory compaction, implementing C extensions would be much more tedious and error prone and there would be less such extensions - limiting the domain where Python is used."