Create a method in Python that accepts two strings and returns a boolean if the two strings are anagrams.
“listen” and “silent”
def is_anagram(string1, string2):
    return (sorted(string1) == sorted(string2))

print(is_anagram("listen", "silent")) # prints True