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