Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaBaweja
Last active December 3, 2019 19:09
Show Gist options
  • Save ChaitanyaBaweja/1600895929ef9f7c7859f3376d4538c7 to your computer and use it in GitHub Desktop.
Save ChaitanyaBaweja/1600895929ef9f7c7859f3376d4538c7 to your computer and use it in GitHub Desktop.
# Reversing a string using slicing
my_string = "ABCDE"
reversed_string = my_string[::-1]
print(reversed_string)
# Output
# EDCBA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment