Variables are pointers in Python

Veröffentlicht am: 02 Mai 2024
auf dem Kanal: Python Morsels
1,945
96

Python's variables are not buckets that contain objects; they're pointers. Assignment statements don't copy: they point a variable to a value (and multiple variables can "point" to the same value).

Article at https://pym.dev/variables-are-pointers/

More #Python screencasts at https://pym.dev/screencasts/

00:00 Changing two lists at once
01:09 Variables are separate from objects
01:38 Assignment statements don't copy
02:04 Explicitly copying a list
02:30 Variables are like pointers, not buckets


Auf dieser Seite können Sie das Online-Video Variables are pointers in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Python Morsels 02 Mai 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,945 Mal angesehen und es wurde von 96 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!