question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Little Sister's Vocab/Essay]: Update About.md to Include removeprefix and removesuffix

See original GitHub issue

Python 3.9 introduces two new string methods that make removing prefixes and suffixes easier.

Little Sisters Vocab has the student remove prefixes and suffixes, but uses Python 3.8 methods. Its follow-on exercise Little Sisters Essay has the student work with startswith() and endswith().

We should note in the string-methods about.md (and possibly in the about.md of strings) that is displayed after the student finishes Little Sisters Essay that Python 3.9 introduces some methods of convenience around removing prefixes and suffixes:

We should also include code examples of common usage.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
BethanyGcommented, Oct 10, 2021
1reaction
kana800commented, Oct 16, 2021

Hi @BethanyG / @J08K,

first of all really sorry about the late reply. I took a deeper dive into the issue and before starting to work on the pull request, I wanted to ask some questions.

In little-sister-vocab concept.

  1. Do I need to mention about removeprefix and removesuffix in introduction.md, hints.md or just in hints.md ?.
  2. Also only remove a suffix from a word is mentioned in the little-sister-vocab concept. Do I need to include about the removesuffix() method?
  3. Do I need to change the .meta/exemplar.py file as well ?

In concepts/strings-methods/about.md, I can do a simple introduction of the new concepts of

  • removeprefix()
  • removesuffix() I dont see the point of mentioning above methods in about.md in strings, If you want to let me know!
Read more comments on GitHub >

github_iconTop Results From Across the Web

Python: removeprefix() and removesuffix() - DEV Community ‍ ‍
rstrip() that can be used to trim prefix and suffix but the parameter accepts a set of characters not the substring. These methods...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found