Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python substitute multiple letters

message = "h@ll$ w$rld"
# make the replacement ('!'->'a', '@'->'e', etc.)
message.translate(str.maketrans("!@#$%", "aeiou"))
# outputs hello world
 
PREVIOUS NEXT
Tagged: #python #substitute #multiple #letters
ADD COMMENT
Topic
Name
6+5 =