Tuesday, 5 May 2020

Python dictionary example

emp={
 
  'name':'anil',
  'age': 18,
  'sex':'male'
 
}
for item in emp.values(),emp.items(),emp.keys():
  print(item)
for key,value in emp.items():
    print(key,value)

No comments:

Post a Comment