Ad

You can just use a generator

Code
Diff
  • def remove_numbers(s):
        return ''.join(l for l in s if not l.isdigit())
    • def remove_numbers(s):
    • return ''.join([l for l in s if not l.isdigit()])
    • return ''.join(l for l in s if not l.isdigit())