Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.14 KB | None | 0 0
  1. a=[15, 30, 45, 60, 75, 90]
  2.  
  3. def split_in_two(x,y):
  4.     if y%2==1:
  5.         print(x[0:2])
  6.     else:
  7.         print(x[2:])
  8. split_in_two(a, 5)
  9. split_in_two(a, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement