Skip to content

Commit

Permalink
Merge pull request Ishaan28malik#1571 from Iqra840/master
Browse files Browse the repository at this point in the history
added an anagram checking script
  • Loading branch information
Ishaan28malik authored Oct 31, 2020
2 parents f856c82 + 48d8348 commit b94f6cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Mini-Projects/Python/Anagram_Checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# function to check if two strings are anagram or not
def check(s1, s2):

# the sorted strings are checked
if(sorted(s1)== sorted(s2)):
print("The strings are anagrams.")
else:
print("The strings are not anagrams.")

# driver code
s1 =input("Enter first string ")
s2 =input("Enter seconf string ")
check(s1, s2)

0 comments on commit b94f6cc

Please sign in to comment.