목록5주 (1)
without haste but without rest
[python / 계프] 5주차 과제 - 딕셔너리
/* input data anne 1 3 6 4 5 6 3 5 john 3 2 3 5 7 2 peter 9 8 2 7 4 9 end */ def print_nested_dict(my_dict): for x in my_dict: if my_dict[x] == 1: print(x, end=' ') else: print('{}({})'.format(x, my_dict[x]), end=' ') print() def print_dict(my_dict): for x in my_dict: print(x, ':', end=' ', sep='') if type(my_dict[x]) == dict: print_nested_dict(my_dict[x]) else: print(my_dict[x]) def list_to_dic..
Homework
2020. 4. 17. 18:01