Skip to content

Commit 5e982b6

Browse files
Final QA updates (#290)
Co-authored-by: Martin Breuss <[email protected]>
1 parent caaf662 commit 5e982b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

how-to-check-if-a-python-string-contains-a-substring/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ In this tutorial you'll focus on the most pythonic approach to tackle this task,
66

77
Finally, you'll also learn how to **find substrings in pandas columns**. This is helpful if you need to search through data from a CSV file.
88

9-
Head over to Real Python to the full tutorial on [How to Check if a Python String Contains a Substring](https://realpython.com/python-string-contains-substring/).
9+
Head over to Real Python for the full tutorial on [How to Check if a Python String Contains a Substring](https://realpython.com/python-string-contains-substring/).

how-to-check-if-a-python-string-contains-a-substring/check_case.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
file_content_title = """Hi There And Welcome.
1+
title_cased_file_content = """Hi There And Welcome.
22
This Is A Special Hidden File With A Secret Secret.
33
I Don't Want To Tell You The Secret,
44
But I Do Want To Secretly Tell You That I Have One."""
55

66
# Strings are case-sensitive
7-
print("secret" in file_content_title) # False
7+
print("secret" in title_cased_file_content) # False
88

99
# Convert the input string to lowercase to generalize matching
10-
file_content = file_content_title.lower()
10+
file_content = title_cased_file_content.lower()
1111

1212
print(file_content)
1313

0 commit comments

Comments
 (0)