Skip to content

Commit

Permalink
Merge pull request #92 from DragoVeizen/main
Browse files Browse the repository at this point in the history
Resolved Issue #43 using Python
  • Loading branch information
ademclk authored Dec 3, 2022
2 parents b40d298 + ee3152e commit 0fa726d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions challenges/Python/reversingstring/revstring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Python 3 code to reverse a string
def reverse(s):
str = ""
for i in s:
str = i + str
return str

s= str(input("Enter the string to be reversed \n"))

print("The original string is : ", end="")
print(s)

print("The reversed string(using loops) is : ", end="")
print(reverse(s))

0 comments on commit 0fa726d

Please sign in to comment.