30-Days-Of-Python
30-Days-Of-Python copied to clipboard
Update 17_exception_handling.md
f missing in f-string in first example of packing dictionaries
Section: Packing dictionaries
Proposed change:
def packing_person_info(**kwargs):
# Printing dictionary items
for key in kwargs:
print(`f`"{key} = {kwargs[key]}") # This is the line to be updated
return kwargs
print(packing_person_info(name="Asabeneh", country="Finland", city="Helsinki", age=250))
What's missing: print(f"{key} = {kwargs[key]}")
Reason: If we don't include f before the string it won't print the key-value pairs.