I have a string which contains a fixed character. Can I generate a permutation of strings by replacing it with another character or string??
Say, I have something like this:
designatedstring="u"
replacerstring="ough"
s="thruput"
I want an output like:
l=["throughput","thrupought","throughpought"]
Is there any way to do this?
More
itertoolssugar:If you can bear with original string in the result, you can omit ugly transformations on 4 and 5 lines.