Skip to content

Commit 170dc69

Browse files
committed
W0105: String statement has no effect (pointless-string-statement)
1 parent c70e61c commit 170dc69

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

0005-Regular-Expressions-Search/regex_search.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
RESULT = re.search(r'ab*', 'a')
3838
print(bool(RESULT)) # Output: True
3939

40-
"""
41-
Pattern r'ab*':
40+
# Pattern r'ab*':
41+
# The regular expression ab* is interpreted as:
42+
# 'a': Match the character 'a'.
43+
# 'b*': Match zero or more occurrences of the character 'b'.
44+
# This means the pattern will match an 'a' followed by zero or more 'b' characters.
4245

43-
The regular expression ab* is interpreted as:
44-
'a': Match the character 'a'.
45-
'b*': Match zero or more occurrences of the character 'b'.
46-
This means the pattern will match an 'a' followed by zero or more 'b' characters.
47-
"""
4846

4947
RESULT = re.search(r'ab*', 'b')
5048
print(bool(RESULT)) # Output: False

0 commit comments

Comments
 (0)