Created
July 10, 2020 07:26
-
-
Save BexTuychiev/b9709d6f4eaa598597e97a5e3e12718d 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
# A function to reverse a string | |
def reverse_string(text: str, upper: bool = False) -> str: | |
reversed_text: str = text[::-1] | |
if upper: | |
return reversed_text.upper() | |
return reversed_text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment