Write a function to rotate string right by a given length


Topic: Write a function to rotate string right by a given length

Solution

def rotate_right(input,d):  
  
    Rfirst = input[0 : len(input)-d]  
    Rsecond = input[len(input)-d : ]  
    return (Rsecond + Rfirst) 



List all Python Programs