diff --git a/dictionary.py b/dictionary.py new file mode 100644 index 0000000..782f5aa --- /dev/null +++ b/dictionary.py @@ -0,0 +1,14 @@ +# Creating an empty Dictionary +Dict = {} +print("Empty Dictionary: ") +print(Dict) +# Creating a Dictionary +# with dict() method +Dict = dict({1: 'Geeks', 2: 'For', 3: 'Geeks'}) +print("\nDictionary with the use of dict(): ") +print(Dict) +# Creating a Dictionary +# with each item as a Pair +Dict = dict([(1, 'Geeks'), (2, 'For')]) +print("\nDictionary with each item as a pair: ") +print(Dict)