Change upper or lowercase vowels to [0,1,2,3,4] respectively and leave the rest the same
Use string.maketrans().

from string import maketrans 

input = "aeiouAEIOU"
output = '0123401234'
trans = maketrans(input,output)
str = 'This is a Q&amp;A site, not a discussiOn forUm, so please make sure you answer the question.'
print str.translate(trans)


Output:

Th2s 2s 0 Q&amp;0 s2t1, n3t 0 d2sc4ss23n f3r4m, s3 pl10s1 m0k1 s4r1 y34 0nsw1r th1 q41st23n.