DEV Community

Discussion on: Write a script to identify an anagram

Collapse
 
vinaypai profile image
Vinay Pai

It performs better but it's wrong. Comparing sums can give you false positives.

>>> sum(map(ord, 'false positive'))
1438
>>> sum(map(ord, 'farce positivo'))
1438
>>>