Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def split_in_two(a_list, number):
- if number%2==0:
- print(a_list[2:])
- else:
- print(a_list[0:2])
- values = ["a", "b", "c", "d", "e", "f"]
- split_in_two(values, 5) #Example (it must contain two arguments: the first argument portraying the list and the second argument being your target number
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement