Course Content
What is Python?
Introduction of Python and Its setup
0/2
Control Statement
Control statements are used to control the flow of execution depending upon the specified condition/logic.
0/4
File Handling
File handling is an important component of any application. Python has multiple functions for creating, reading, updating, and deleting files.
0/2
Examples
Following are the examples of python scripts to try hands-on, you are ready to start your python journey.
0/7
Python
About Lesson

Python dictionary is an unordered collection of items. In a dictionary, each item has a key/value pair.

Example:

users = {'name':'Junaid', 'age':25}
print(users)
print(type(users))

# access data from dictionaries
print(users['name'])

user_info = {
    'name' : 'Junaid Shaikh',
    'age' : 24,
    'skills' : ['a', 'v'],
    'tunes' : ['t', 'tv'], 
}
print(user_info['skills'])
Function Description
dict.clear() removes all elements of dictionary dict
dict.copy() returns a shallow copy of dictionary dict
dict.items() retuns a list of dict’s (key, value) tuple pairs
dict.setdeafult(key, default=Nonre) similiar to get(), but will set dict[key] = default
dict.update(dict2) adds dictionary dict2’s key-values pairs to dict
dict.keys() returns list of dictionary dict’s keys
dict.values() returns list of dictionary dict’s values