Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored May 27, 2022
1 parent 89b5393 commit 980464d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Reversed_string_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # A function that takes a string and returns it in reverse
# Reverse the string and use a for loop to add the reversed letters to another string

def solution(string):
rev = reversed(string)
string_1 = ""
for letter in rev:
string_1 += letter
return string_1

0 comments on commit 980464d

Please sign in to comment.