Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def split_in_two(values, number): #two parameters
- if number%2==0:
- print(values[2: ])
- else:
- print(values[0 : 2])
- split_in_two(["Book", "bag", "pencil", "pen"], 1) # Example( it must contain two arguments) the first argument must be a list containing strings and the second argument must be a positive integer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement