Skip to content

Commit

Permalink
Merge pull request #860 from vikrambitaal/vikrambitaal-patch-1-4
Browse files Browse the repository at this point in the history
Create aniket
  • Loading branch information
fineanmol authored Oct 12, 2021
2 parents 5a70e55 + 267c51e commit d22be10
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions aniket
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Python code to reverse a string
# using loop

def reverse(s):
str = ""
for i in s:
str = i + str
return str

s = "Geeksforgeeks"

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

print ("The reversed string(using loops) is : ",end="")
print (reverse(s))
# Python code to reverse a string
# using loop

def reverse(s):
str = ""
for i in s:
str = i + str
return str

s = "Geeksforgeeks"

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

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

0 comments on commit d22be10

Please sign in to comment.