Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

unnecessary utility #15

Open
GreatBahram opened this issue May 17, 2019 · 0 comments
Open

unnecessary utility #15

GreatBahram opened this issue May 17, 2019 · 0 comments

Comments

@GreatBahram
Copy link

It seems you don't need utils at all.
You can use some kind of comprehension to make the code even much more readable and independent.

return ''.join(
    dic.get(char, char) # maybe dic is not a good name though
    for char in string
)

return utils.replace(string, dic)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant