Advertisement
STANAANDREY

lsd4 13

Oct 22nd, 2022
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def split(lst):
  2. if len(lst) == 0:
  3. return [], []
  4.  
  5. lst1, lst2 = split(lst[2:])
  6.  
  7. lst1.insert(0, lst[0])
  8. if len(lst) >= 2:
  9. lst2.insert(0, lst[1])
  10.  
  11. return lst1, lst2
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement