Answers for "remove all char from string"

1

remove occurrence in string pytthon

str="it is icy"
print str.replace("i", "")
Posted by: Guest on June-26-2020
0

remove char from string

def replace_(input_:str,latter:int):
    name_ = ""
    checkList=[]
    for num in range(latter):
        checkList.append(num)
    for i in range(0, len(input_)):
        if i not in checkList:
            name_ = name_ + input_[i]
    return  name_

name_=replace_("give hello",5)
print(name_) #will print hello
Posted by: Guest on June-05-2021

Code answers related to "remove all char from string"

Python Answers by Framework

Browse Popular Code Answers by Language