Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new_list = [14, 15, 16, 17]
- old_list = [17, 20]
- print(new_list)
- print(old_list)
- print('===========')
- del_val = []
- set_val = []
- for i in old_list:
- if i in new_list:
- pass
- else:
- del_val.append(i)
- for i in new_list:
- if i in old_list:
- pass
- else:
- set_val.append(i)
- print(del_val)
- print(set_val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement