How to CHECK the ANAGRAM of the STRINGS 💯🔥...#python #programming #coding #edit #shorts #anagram

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Bro dropped the hardest coding edit and thought we wouldn't notice

Pluto-Code
Автор

This code would say that is an anagram to ”abcdef”, which is incorrect

n_lgic
Автор

You can use sorted metod in strings to sort

BDIt-vjhk
Автор

Hi Guys, In this video I made a small mistake 😅...
Here is the correct solution, if you find any mistake in this code then you are a real professional🤝


s1 = input()
s2 = input()
count = 0
for s in s1:
s_count = s1.count(s)
if s in s2 and s2.count(s)==s_count:
count+=1
print("anagram"\
if (count==len(s2)) \
else "not an anagram")

ADcode
welcome to shbcf.ru