Can you define dictionary in Python?
Dictionary in Python is one of supported data types in Python. Dictionary is an unordered collection of elements. And all the elements in dictionaries are stored as key-value pairs. And dictionaries are indexed by keys.
To understand dictionary we will take a example of dictionary which name is student. And this will have two keys, Name and subject along with there values.
syntax:-
student={'Name':'Adam','Subject':'English'}
output:-
Name:Adam, Subject:English | |