L33T5P34K in Python #python #coding #programming

preview_player
Показать описание
Python script that converts regular text to l33tspeak
Рекомендации по теме
Комментарии
Автор

why use join and a list there?

you can replace the entire if-else with
outputText += ledger.get(c, c)

artemetra
Автор

for key, value in ledger.items():
input_text = input_text.replace(key, value)

return input_text

thepoorsultan
Автор

It's better to use the translate() string method

EnterGin
Автор

Also why join instad of just adding the strings

MikesGoAcademy
Автор

The entire loop and if else statements can be replaced with a small one liner

return "".join( [ ledger.get(c, c) for c in inputText])

kinghultan