Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_repeated_list(dict_a, dict_b):
- result = []
- for key, value in dict_b.items():
- if value > 0:
- if 'Physician_1' in dict_a and key <= len(dict_a['Physician_1']):
- list_to_repeat = [0.0 if v == -0.0 else v for v in dict_a['Physician_1'][key - 1].values()]
- for _ in range(int(value)):
- result.extend(list_to_repeat)
- else:
- print(f"Schlüssel {key} nicht in dict_a['Physician_1'] gefunden")
- return result
Advertisement
Add Comment
Please, Sign In to add comment