0
Q:

set replace python

# Simple replacement
str.replace(old, new, count)

# Multi-match replacement
import re
STRING = re.sub("(\.fasta|\.fna)","", STRING)
1
#our text
text='Hello! there/ how may. I help, you' #yes, it seems weird
     #replacing ("THIS" with "THIS") 
replaced_text=text.replace("!", "?")
print(replaced_text)
#output
#Hello? there/ how may. I help, you
0
# Replace 1 with 4
s = {1, 2, 3}
s.remove(1)
s.add(4)
0

New to Communities?

Join the community