Skip to content

Instantly share code, notes, and snippets.

@NguyenDa18
Created March 10, 2022 21:27
Show Gist options
  • Save NguyenDa18/959dfa0034c7394681408718ec3373aa to your computer and use it in GitHub Desktop.
Save NguyenDa18/959dfa0034c7394681408718ec3373aa to your computer and use it in GitHub Desktop.
Remove parentheses with Python
parens_table = str.maketrans(dict.fromkeys("()"))
# remove parens
converted = converted.translate(parens_table)
return converted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment