Last active
May 5, 2022 21:44
-
-
Save YiLi225/e9a9dcda40b2bfe9fda498aa5e67278b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace with the correct words | |
from functools import reduce | |
reduce(lambda x, y: x.replace(*y), [curText, *list(correctDict.items())]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment