PHP's str_replace ?

Anjanesh Lekshminarayanan mail at anjanesh.net
Wed Sep 10 09:50:21 EDT 2008


In PHP, if I do
str_replace(array('a', 'e', 'i', 'o', 'u'), '-', $str)
it'll replace all vowels with a hyphen in string $str.

Is there some equivalent in Python ?

Thanks



More information about the Python-list mailing list