kyu_5.where_my_anagrams_at package

Submodules

kyu_5.where_my_anagrams_at.anagrams module

kyu_5.where_my_anagrams_at.anagrams.anagrams(word, words)[source]

A function that will find all the anagrams of a word from a list. You will be given two inputs a word and an array with words. You should return an array of all the anagrams or an empty array if there are none.

kyu_5.where_my_anagrams_at.test_anagrams module

class kyu_5.where_my_anagrams_at.test_anagrams.AnagramsTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing anagrams function

test_anagrams()[source]

Test a function that will find all the anagrams of a word from a list. You will be given two inputs a word and an array with words. You should return an array of all the anagrams or an empty array if there are none.

For example:

anagrams(‘abba’, [‘aabb’, ‘abcd’, ‘bbaa’, ‘dada’]) => [‘aabb’, ‘bbaa’] anagrams(‘racer’, [‘crazer’, ‘carer’, ‘racar’, ‘caers’, ‘racer’]) => [‘carer’, ‘racer’] anagrams(‘laser’, [‘lazing’, ‘lazy’, ‘lacer’]) => [] :return:

Module contents