Question: python please!! Same Ends Write a predicate function called sone ends that accepts a list of integers and an integer (n) as arguments. Return True
Same Ends Write a predicate function called sone ends that accepts a list of integers and an integer (n) as arguments. Return True if the first n numbers in the list are the same as the last n numbers in the list, and False otherwise. For example, if the list was [1, 2, 3, 4, 99, 1, 2, 3, 4), the function would return True if nis 4 and Folse ifnis 3. Assume that is between 1 and the length of the list, inclusive Same Ends Write a predicate function called stends that accepts a list of integers and an integer (n) as arguments. Return True if the first n numbers in the list are the same as the last n numbers in the list and false otherwise. For example, of the list was [1, 2, 3, 4, 99, 1, 2, 3, 4), the function would return Truefnis 4 and Falsins. Assume that is between 1 and the length of the list, inclusive
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
