translate replaces parts of a string, translate only works with single characters : Translate : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Translate »

 

translate replaces parts of a string, translate only works with single characters


from string import maketrans
table = maketrans('cs', 'kz')
print 'this is a test'.translate(table)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Translate