In python "." What's the difference between operation, ['attr'] operation, get (' attr')

a = {"name":" zzzz"}

a.name = "yuioi" / / error
a [" name"] = "asdasd"

Why "." Operation will report an error

Mar.03,2021

AttributeError: 'dict' object has no attribute' name'
you confuse the concepts of attributes of class objects with dictionary data structures.

first of all, the Dict class does not have the attribute name. So you can't dict.name. However, as a data structure, you can think of 'name'' as a kind of index, similar to array a [0], a [3] index, then you can get the corresponding value

through dict ['name'].
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bb27-4392f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bb27-4392f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?