#!/usr/bin/python3 # =================================================================== # # =================================================================== dct = { 'b':'y', 'a':'x', 'c':'z' } print() print(f'dct: {dct}') print() print('---- dct --------------') for x in dct: print(f'{x}') print('---- sorted dct -------') for x in sorted(dct): print(f'{x}') print() print('---- items() ----------') for x in dct.items(): print(f'{x}') print('---- sorted items() ---') for x in sorted(dct.items()): print(f'{x}') print() print('---- keys() -----------') for x in dct.keys(): print(f'{x}') print('---- sorted keys() ----') for x in sorted(dct.keys()): print(f'{x}') print() print('---- values() ---------') for x in dct.values(): print(f'{x}') print('---- sorted(values()) -') for x in sorted(dct.values()): print(f'{x}')