Webeduclick.com
Computer Science Tutorials
Dict={'Name': 'Jeff Bezos', 'Age': 40, 'Marriage Status': 'Married'} inverted={} for key, val in Dict.items(): inverted[val]=key print("Dict:", Dict) print("Inverted Dict:", inverted)
Output: