Can I change my variable name in Python? For example, I have a string x, and I want to change string x variable name to y, how can I do it?
Can I change variable name in Python
4.1k Views Asked by scissors127 At
2
Can I change my variable name in Python? For example, I have a string x, and I want to change string x variable name to y, how can I do it?
Python variables are references to objects, so you can simply create a second name pointing to the existing object and delete the old name: