Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner: Use As Much Conditions As You Can, It's Free ;) solution in Speedy category for Word Pattern by Stensen
def check_command(pattern, command, C={'0': True, '1': False}):
return all(C[i] == j.isdigit() if len(bin(pattern)[2:]) <= len(command) else False for i, j in zip(bin(pattern)[2:].zfill(len(command)), command))
Oct. 12, 2020