Skip to content

Commit 2913668

Browse files
authored
Final QA (#658)
1 parent ad548be commit 2913668

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

python-strip/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# How to Strip Characters From a Python String
22

3-
This folder contains code snippets from the Real Python tutorial on [How to Strip Characters From a Python String](https://realpython.com/how-to-use-python-strip-remove-characters/).
3+
This folder contains code snippets from the Real Python tutorial on [How to Strip Characters From a Python String](https://realpython.com/python-strip/).
44

55
## License
66

python-strip/remove_suffix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
filename = "txt_transcript.txt"
44

55
# Incorrect: .strip() doesn't remove sequences
6-
print(filename.strip("txt_"))
6+
print(filename.strip(".txt"))
77
# Correct: Use .removesuffix() for this task
88
print(filename.removesuffix(".txt"))
99

python-strip/username.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
submitted_username = "_!__YoJohnDoe!__!!"
1+
submitted_username = "_!__Yo_JohnDoe!__!!"
22
cleaned_username = submitted_username.strip("!_")
33
print(cleaned_username)
44

0 commit comments

Comments
 (0)