0

Please some one tell me the meaning of this sentence>>>> in description

"If it does, match returns an object representing the match, if not, it returns None. " This is from regular expression. Here i didn't understand that "it does" refers to whom ? https://www.sololearn.com/learning/2475/

18th Jul 2021, 4:17 AM
UnTentetive
2 Answers
+ 4
Amit Ranjan Sahoo That link doesn't load for me. I'm assuming "it does" refers to a match existing for the given regex pattern on a given string value.
18th Jul 2021, 5:22 AM
David Carroll
David Carroll - avatar
+ 1
Amit Ranjan Sahoo Here, the match() function returns a match object if the string matches the regex pattern. Else, it returns None. P.S. None is also an object, an instance of the NoneType class.
18th Jul 2021, 4:46 AM
Calvin Thomas
Calvin Thomas - avatar