Skip to content

raw_input #11

@suresh-krishna-d

Description

@suresh-krishna-d

You have to change the raw_input as input

import re

string_in = input("Enter the string")

char_rem = input("Enter the character")

def regex_strip(string_in,char_rem):

a = re.compile(r'[%s]'%(char_rem))
 
# sub(pattern,replace,string,max=0)

return a.sub('',string_in)

print (regex_strip(string_in,char_rem))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions