What happens when you assign the value of one variable to another variable in Python?

后端 未结 10 815
太阳男子
太阳男子 2020-11-30 00:54

This is my second day of learning python (I know the basics of C++ and some OOP.), and I have some slight confusion regarding variables in python.

Here is how I unde

10条回答
  •  暖寄归人
    2020-11-30 01:40

    As @DeepSpace mentioned in the comments, Ned Batchelder does a great job demystifying variables (names) and assignments to values in a blog, from which he delivered a talk at PyCon 2015, Facts and Myths about Python names and values. It can be insightful for Pythonistas at any level of mastery.

提交回复
热议问题