+ 1
Has anyone solved lesson 84.2 Word Games in the python course yet?
To me the code seems like it should work as is but for some reason the input isnt making its way to the argument in the if statement. Below is the code provided so if someone could help me out I'd appreciate it. Feel like I gotta be missing something simple but it just isn't coming to me. import re word = input() if re.match(word, "gl"): print("Match") else: print("No match")
2 Answers
+ 6
Eric Manfred
"gl" should be at 1st position.
if re.match("gl", word):
+ 1
Ahhhh thank you for the quick response