Alle Dateien aus dem Pythonkurs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
356 B

# encoding utf-8
kfz = {
'W':'Wuppertal',
'HH':'Hamburg',
'D':'Düsseldorf',
'DO':'Dortmund',
'H':'Hannover',
'M':'München'}
for key in kfz:
print(f' Kennzeichen {key} -> Stadt {kfz[key]}')
print()
for key, stadt in kfz.items():
print(f' Kennzeichen {key} -> Stadt {stadt}')
items = kfz.items()
keys = kfz.keys()
print(items)
print(keys)