for i in (f):
r = re.sub('.*\.f', '.wiki [href*=""], .f', i)
s = re.sub('width', 'min-width', i)
t = re.sub('height:40px;', '', i)
outp.append(r)
outp.append(s)
outp.append(t)
As you can see, I have 3 lines of regex that work individually but it doesn't work like how I'd want to because they are appended 3 times so I need to combine them and append it once.
re.sub('height:40px;', '', re.sub('width', 'min-width', re.sub('.*\.f', '.wiki [href*=""], .f', i))). Just replace each i with anotherre.sub(). The inner-mostre.sub()function will be evaluated first. This is the same as the answer given by Cantfindname.