Python program for creating dictionary object

Kunal bhati Jul 10, 2021

In Python Dictionary is an ordered collection of data values, used to store data values. Python dictionary is an unordered collection of items. Each item of a dictionary has a key/value pair.

It is a program that creates dictionary objects to store different types of data values in an ordered collection to simplify things for the organization.

This program stores the name, age, salary, etc.

INPUT- 

print ('KUNAL BHATI')

Employee={"Name":" MONTY ","Age":20,"salary":70000,"Company":"google"}

print(type(Employee))

print(Employee)

 

d1=dict({1:"java",2:"C++",3:"Python"})

print(d1.get(2))

print(d1.keys())

print(d1.values())

print(d1.items())

 

OUTPUT-

Project Files

Loading...
..
This directory is empty.

Comments (0)

Leave a Comment