<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>03-Dictionaries :: My Site</title><link>https://trungnte.github.io/my-fcj-blog/python/03-dictionaries/index.html</link><description>1. Overview Dictionaries provide a mechanism for storing data labelled with a keyword or other information. Use curly brackets to create a dictionary, and associate each piece of data with a label. Shell &gt;&gt;&gt; a = {'mass': 17.3, 'length': 0.7} &gt;&gt;&gt; print(a) {'mass': 17.3, 'length': 0.7} &gt;&gt;&gt; type(a) &lt;class 'dict'&gt; Or another syntax
Shell &gt;&gt;&gt; b = dict(name='Trung', age=38) &gt;&gt;&gt; print(b) {'name': 'Trung', 'age': 38} &gt;&gt;&gt; type(b) &lt;class 'dict'&gt; 2. Some methods particular to dictionaries a.keys()</description><generator>Hugo</generator><language>en</language><lastBuildDate/><atom:link href="https://trungnte.github.io/my-fcj-blog/python/03-dictionaries/index.xml" rel="self" type="application/rss+xml"/></channel></rss>