mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 12:46:11 -04:00
19 lines
325 B
Python
19 lines
325 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
# author: bt3gl
|
|
|
|
|
|
def is_anagram(string1, string2) -> bool:
|
|
|
|
string1 = string1.lower()
|
|
string2 = string2.lower()
|
|
|
|
if len(string1) != len(string2):
|
|
return False
|
|
|
|
for c in string1:
|
|
if c not in string2:
|
|
return False
|
|
|
|
return True
|