0

I had a problem that could be solved by using findall():

# that's not the problem I was solving, just a simple code to demonstrate

import re

txt = "The rain in Spain"
x = re.findall("[TriS][hanp][eia]?[ni]?", txt)
print(x)

But I have no clue what the '?' are doing and also can't understand the explanation on python docs

g_lob00
  • 3
  • 3

0 Answers0