Advertisement
STANAANDREY

mod sub 3

Jan 18th, 2023
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def mapper(lst1, lst2):
  2.     if len(lst1) == 0 or len(lst2) == 0:
  3.         return {}
  4.  
  5.     ans = dict()
  6.     ans[lst1[0]] = lst2[0]
  7.     ans.update(mapper(lst1[1:], lst2[1:]))
  8.     return ans
  9.  
  10. print(mapper([1, 18, 118], [0, 1, 1, 1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement