What I'm feeling is that Python's variable name can actually be understood as a pointer in C + +!
1. A python variable must be assigned before it is used, just as the pointer cannot be empty before it is used. 2, Python memory can be released with Del, C + + can be released with delete. Python:del temp #表示temp所 "Paste to" memory is released, when the TEMP variable is equal to not being assigned (no corresponding memory space), it can not be used. C + +: Delete temp; Releasing the pointer is actually releasing the memory that the pointer points to by the pointer.
A Python variable can be understood as a pointer or a label, and when a note is associated with a piece of memory, the action on the note is the action on that block of memory. The way to associate memory with a tag is the "=" assignment statement
The difference is that the required pointer types must match in C + +. and the tags in Python can be pasted.
Python Variable name sentiment