Demystifying variable assignment in python