Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def clean_compositions(dataset):
- for in_list, out_list, program in dataset:
- i = 0
- while i < len(program):
- popped_func = program.pop(i)
- new_value = eval(program.compose(in_list))
- if new_value != out_list:
- program.insert(i, popped_func)
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement