1)Creating a Dictionary of fruits --apple=5,orange=4,grapes=6,banana=3, Berries=8,mango=2
-Accessing each Values in a Dictionary one by one.
- Accessing each Values in a Dictionary with iteration.
- Adding Key-Value Pair: tomato=10.
- Updating Key-Value Pairs: kiwi=7 , lemon=9,cherry=10.
- Removing any 2 Key-Value Pairs.
-Applying all temporary functions on given dictionary.
-Iterating only keys in that given dictionary.
- Iterating only values in that given dictionary.
-Copy whole dictionary into other dictionary.
-Removes last value using inbuilt method.
-remove apple using inbuilt method.
-Clear whole dictionary.
2)create a set -- my_set = {1, 'apple', (3, 4), 5.5, True}
My_set1={“apple”,”banana”,5.5}
- What are the elements in the original my_set?
- Is the element 'apple' present in the my_set?
- After adding 'banana' to the my_set, what are the updated elements?
- Remove the element (3, 4) from the my_set.
- Find the intersection of the my_set with my_set1.
- calculate the union of both the set.
- Find the difference between my_set with my_set1.
-Find the difference between my_set1 with my_set
- Check if the my_set1 is subset of my_set and viceversa.
- check if the my_set is superset of my_set1 and viceversa.
- Perform all temporary inbuilt functions on my_set.