← Back to challenges

Remove the Letters ABC

PythonHardstringsloopsregex

Instructions

Create a function that will remove the letters "a", "b" and "c" from the given string and return the modified version. If the given string does not contain "a", "b", or "c", return None.

Examples

remove_abc("This might be a bit hard") ➞ "This might e  it hrd"

remove_abc("hello world!") ➞ None

remove_abc("") ➞ None

Notes

If the given string does not contain "a", "b", or "c", return None.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: The Collatz Conjecture