Skip to content

Instantly share code, notes, and snippets.

@uruskan
Created August 8, 2023 17:03
Show Gist options
  • Save uruskan/1c51d2b32e4501d6bb906585dfafa320 to your computer and use it in GitHub Desktop.
Save uruskan/1c51d2b32e4501d6bb906585dfafa320 to your computer and use it in GitHub Desktop.
def FirstReverse(strParam):
ay = [] # Create an empty array
for char in strParam:
ay.append(char) # Add each character to the array
reversed_str = "" # Initialize an empty string to store the reversed string
i = len(ay) - 1
while i >= 0:
reversed_str += ay[i] # Concatenate each character to the reversed string
i -= 1
return reversed_str
# Keep this function call here
print(FirstReverse(input()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment