How are python dictionaries different from python lists?

A dictionary is a set of unordered key, value pairs. In a dictionary, the keys must be unique and they are stored in an unordered manner.
To build a dictionary separate the key and value pairs by a colon(:). The keys need to be an immutable type i.e. data types for which the keys cannot be changed at runtime such as int, string, tuple, etc. Individual pairs will be separated by a comma(,) and the whole thing will be enclosed in curly braces({…..}).
A list is a data structure, or it can be considered as a container that can be used to store multiple data at once. A list will be ordered and there will be a definite count of it.
Operation and declaration of list:-
To create a list you separate the elements with a comma and enclose them with a bracket”[]”.
e.g.,
a=["Python", "C++", "C", "Java"] print(a)

We can create a two dimensional list. This is done by nesting a list inside another list.
e.g.,
a=[['1', '2'], ['3', '4']] print(a)

Some basic function to modify list are:-
- list.append() – This function will add another element to the list at the end.
syntax:-
lst=[] lst.append("name_of_element")
- list.insert() – This will add another element to the list at the given index, shifting the elements greater than the index one step to the right.
syntax:-
lst=[] lst.insert(index_number, "Element_name")
- list.pop() – This function will remove the last element from the list. If the index is provided, then it will remove the element at the particular index.
syntax:-
lst=[] lst.pop(index_number)
Operations and declaration of dictionary:-
To build a dictionary separate the key and value pairs by a colon(:).
e.g.,
a={1:2, 3:1, 2:3} print(a)

This is all about difference between dictionary and lists in python.