all these lines using the replace you can use directly this:
s = "asjo,fdjk;djaso,oio!kod.kjods;dkps"
s.translate(None, ",!.;")
'asjofdjkdjasooiokodkjodsdkps'