Q. Write a program to display the maximum and minimum values from the specified range of indexes of a list.
Answer =
lst = eval(input("Enter a list :-")) start = int(input("Enter starting index :-")) stop = int(input("Enter stoping index :-")) print( "Max :-", max( lst [ start : stop ] ) ) print("Min :- ", min( lst [ start : stop ] ))
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )