Function Arguments – Clarification

g is a variable with the name g. Just like x is in x = consonant('g').

'g' is the literal string 'g'.

Be aware that your code does not support upper case characters.

Unrelated but

if ch in l:
    return False
else:
    return True

Can be simplified to

return ch not in l

Leave a Comment