PythiloMedium · 25 min · Task 83 of 100 · progress kept in this browser

Shortest word ladder

Return the number of words in a shortest transformation from start to end, changing one character at a time through a supplied word list. All words have equal length. Return zero if impossible; start=end returns one.

a, b = 'hit', 'hot'
print(sum(x != y for x,y in zip(a,b)))
Your task

Return the number of words in a shortest transformation from start to end, changing one character at a time through a supplied word list. All words have equal length. Return zero if impossible; start=end returns one.