From ba4cf55d050b73a796cf2bc78aa463efb746fa08 Mon Sep 17 00:00:00 2001 From: GANESH CHANDRAN Date: Fri, 20 Dec 2024 20:42:47 +0530 Subject: [PATCH] Add files via upload --- Day-22/ganesh22.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Day-22/ganesh22.py diff --git a/Day-22/ganesh22.py b/Day-22/ganesh22.py new file mode 100644 index 0000000..14d4d74 --- /dev/null +++ b/Day-22/ganesh22.py @@ -0,0 +1,11 @@ +og= {'name': 'Alice', 'age': 25, 'city': 'New York'} +print("original dictionary",og) +print("Keys:",og.keys()) +print("Values:",og.values()) + +print("Key-Value Pairs:",og.items(),end=" ") + +print("Value for 'name':",og["name"]) +print("Value for 'age':",og['age']) +print("Dictionary after pop:",og.popitem()) +print("Dictionary after clear:",og.clear()) \ No newline at end of file