Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #split_in_two
- values = ["a", "b", "c", "d", "e", "f"]
- def split_in_two(values, a ):
- if a % 2 == 0:
- print(values[:2])
- else:
- print(values[-4:])
- split_in_two(values, 2)
- split_in_two(values, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement