Skip to content

Commit

Permalink
Reverse a word in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
chamuditharav committed Oct 2, 2022
1 parent 8f731c8 commit c9c9d69
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions reverse-word.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
word = str(input("Word : "))


def reverse(word):
reversed = word[::-1]
return reversed


print(reverse(word))

0 comments on commit c9c9d69

Please sign in to comment.