Exercise
- Find the number of ways to find whether a key exists in a dictionary or not.
- Use the dictionary,Â
port1 = {21: "FTP", 22:"SSH", 23: "telnet", 80: "http"}
, and make a new dictionary in which keys become values and values become keys, as shown:Port2 = {“FTP":21, "SSH":22, “telnet":23, "http": 80}
Â
Â