Skip to content

Commit

Permalink
Create joe_g.py
Browse files Browse the repository at this point in the history
  • Loading branch information
joegeorge022 authored Dec 20, 2024
1 parent c10b43e commit 4b7b45d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions Day-22/joe_g.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

dict1 = {
"name":"Joe",
"status":"alive",
"age":18,
"profession":"engineer",
"location":"Kottayam"
}

print(dict1)
print(dict1.keys())
print(dict1.values())
print(dict1.items())

dict2 = {
"name":"Better Joe",
"status":"alive",
"age":24,
"profession":"asset manager",
"location":"New York"
}

dict1.update(dict2)
print(dict1)

dict3 = {
"name":"Happy Joe",
"status":"alive",
"age":40,
"profession":"retired",
"location":"Switzerland"
}


dict3.pop("age")
print(dict3)


dict1.clear()
dict2.clear()

print(dict2,dict1)

dict4 = {
"name":"Joe",
"age":41,
"status":"dead",
"profession":"none",
"location":"unknown"
}

print(dict4)

0 comments on commit 4b7b45d

Please sign in to comment.