Write a program to replace every element with the greatest element on right side
A = list(map(int,input("Enter the numbers: ").split())) #map returns the object.It passes elements from 2nd arguement to 1st. N=len(A) for i in range(N): temp=A[i] for j in range(i,N): if A[j]>temp: A[i]=A[j] break print(A) ''' Input: Enter the numbers: 16 17 4 3 5 2 Output: [17, 17, 5, 5, 5, 2] '''