+ 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")

11th Jun 2021, 12:42 PM
Eric Manfred
Eric Manfred - avatar
2 Respuestas
+ 6
Eric Manfred "gl" should be at 1st position. if re.match("gl", word):
11th Jun 2021, 12:46 PM
A͢J
A͢J - avatar
+ 1
Ahhhh thank you for the quick response
11th Jun 2021, 1:07 PM
Eric Manfred
Eric Manfred - avatar