Write a program part_reverse(lst,start, end) to reverse elements in a list where arguments are start and end index of the list part which is to be reversed.
Assume that,start =0 and end
Sample Input Data of List:
my_list=[1,2,3,4,5,6,7,8,9,10]
Function Call = part_reverse(my_list,3,6)
Output is
my_list=[1,2,3,7,6,5,4,8,9,10]
Answers
Answered by
3
Input : list = [10, 11, 12, 13, 14, 15]
Output : [15, 14, 13, 12, 11, 10]
Input : list = [4, 5, 6, 7, 8, 9]
Output : [9, 8, 7, 6, 5,
Similar questions