Friday, February 1, 2019

Replace me if you can

  • Problem Description

    Raj and Raju are thick friends. They decided to play a game . Raju is an excellent guy with good communication skills. Raj decided to test his friend raju with few tounge twisters.

    Raj will utter some sentence to his friend. Upon listening to Raj now raju needs to write those sentences told by his friend. 

    Then raj will utter a word. The task is replace all the words that has been uttered by raj in the sentence with a special character #. Kindly help raju and raj to complete their game. Refer sample input and output for more details
  • CODING ARENA
  • a=input()
    b=input()

    print(a.replace(b,"#"))
  • Test Case 1

    Input (stdin)
    SRM University is in Chennai
    
    U
    
    
    Expected Output
    SRM #niversity is in Chennai
  • Test Case 2

    Input (stdin)
    eLab is a Auto Evaluation TOOL
    
    O
    
    
    Expected Output
    eLab is a Auto Evaluation T##L

1 comment: