Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pytest simple module to be tested

An anagram is a pair of words containing the exact same letters in different order. For example:

  • listen silent
  • elvis lives
def is_anagram(a_word, b_word):
    return sorted(a_word) == sorted(b_word)