I have 1 JSON as followsmyObj_1 = name runoob alexa10000 sites site1 wwwrunoobcom site2 mrunoobcom site3 crunoobcom Why can I use the following 2 codes in Python to
Both Code 1 and Code 2 can be used to query the value of "site2" in myObj_1 because "sites" is a nested object within myObj_1 and can be accessed either using dot notation (Code 1) or bracket notation (Code 2). Both notations are valid in Python to access properties of an object.
原文地址: https://www.cveoy.top/t/topic/fX4f 著作权归作者所有。请勿转载和采集!