Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Word Pattern by Moff
import string
def check_command(pattern, command):
for c in command[::-1]:
if c in string.digits and pattern % 2 == 1:
return False
elif c in string.ascii_letters and pattern % 2 == 0:
return False
pattern //= 2
if pattern > 0:
return False
return True
July 27, 2015