learn-python icon indicating copy to clipboard operation
learn-python copied to clipboard

Incorrect Comment About Accessing Dictionary Elements

Open Imran-imtiaz48 opened this issue 6 months ago • 0 comments

The comment "# You may access set elements by keys." is misleading. The code is about dictionaries, not sets. In Python, set elements cannot be accessed by keys—only dictionary elements can. The comment should be corrected to "# You may access dictionary elements by keys." to accurately reflect the code's behavior.

Imran-imtiaz48 avatar Jun 26 '25 19:06 Imran-imtiaz48