Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word1 = "Нос"
- word2 = "Сон"
- word1 = word1.lower()
- word2 = word2.lower()
- count = 0
- for i in range(0, len(word1)):
- if word1.count(word1[i]) == word2.count(word1[i]):
- count += 1
- if count == len(word1):
- print("Анаграмма")
- else:
- print("Не анаграмма")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement