Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Python/check_anagram.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# program to check anagram

from collections import Counter

def check(s1, s2):

# implementing counter function
if(Counter(s1) == Counter(s2)):
print("The given strings are anagrams.")
else:
print("The given strings are not anagrams.")

s1 = input("Enter 1st word :")
s2 = input("Enter 2nd word :")
check(s1, s2)