We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74190ab commit 8b0bcc4Copy full SHA for 8b0bcc4
strings/detecting_english_programmatically.py
@@ -25,6 +25,18 @@ def get_english_count(message: str) -> float:
25
26
27
def remove_non_letters(message: str) -> str:
28
+ """
29
+ >>> remove_non_letters("Hi! how are you?")
30
+ 'Hi how are you'
31
+ >>> remove_non_letters("P^y%t)h@o*n")
32
+ 'Python'
33
+ >>> remove_non_letters("1+1=2")
34
+ ''
35
+ >>> remove_non_letters("www.google.com/")
36
+ 'wwwgooglecom'
37
+ >>> remove_non_letters("")
38
39
40
return "".join(symbol for symbol in message if symbol in LETTERS_AND_SPACE)
41
42
0 commit comments