|
|
|
|
|
by exitb
657 days ago
|
|
This is the function that confused the person you respond to, ported to Python: def color(word, letter, idx):
if word[idx] == letter:
return GREEN
elif letter in word:
return YELLOW
else:
return GREY
I know which one I'd prefer to grok at 2AM with alerts going off. |
|
Don't confuse familiarity with readability.