Answer:
Following are the code to this question:
def strip_r_o(val): #Defining a method strip_r_o that takes a parameter
r = "" #defining a string variable
for x in range(len(val)): # declaring a for loop that reads input value
if (not val[x] == "R") and (not val[x] == "O"): #declaring if block to check first character is not R and O
r=r+val[x] #add character values
print(r) #Print calculated value
val= input("Enter a string: ") #input value from user end
strip_r_o(val) #Calling strip_r_o method
Output:
Enter a string: Raju
a
aj
aju
Explanation:
Following are the description of the above python code: