Explain various features of a dict datatype in python. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Explain various features of a dict datatype in python.

30th Sep 2020, 5:53 PM
Vipul Pant
Vipul Pant - avatar
3 Answers
+ 4
As you have not finished the python tutorial, i would recommend you to do so. on the bottom find 2 links dedicated to dictionary: >>> To get more info about dict, use console and type: help(dict) and press return https://www.sololearn.com/learn/Python/2450/ https://www.sololearn.com/learn/Python/2451/
30th Sep 2020, 7:51 PM
Lothar
Lothar - avatar
+ 3
cruid = create read update insert delete
30th Sep 2020, 6:12 PM
Oma Falk
Oma Falk - avatar
+ 2
In Python, there are only a few very popular containers. dict, list, and tuple. A dict is different from a list because you can map any immutable key to any value. A dictionary in Python is similar to c++'s map, Java's HashMap, c#'s Dictionary, and PHP's associative array. You can do what you'd expect with any key-value pair container. You can set keys to map to specific values. mydict = {} mydict['x'] = 4 mydict['y'] = 5 # you can remove or unset keys. mydict.pop('y') A more tutorial-like explanation is at: https://www.w3schools.com/python/python_dictionaries.asp The most detail and most trusted source for information about dictionaries is the official documentation at: https://docs.python.org/3/tutorial/datastructures.html
30th Sep 2020, 6:11 PM
Josh Greig
Josh Greig - avatar