You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
204 B
Python
6 lines
204 B
Python
5 years ago
|
def is_decimal(num):
|
||
|
import re
|
||
|
text = "The quick brown fox jumps over the lazy dog."
|
||
|
# remove words between 1 and 3
|
||
|
shortword = re.compile(r'\W*\b\w{1,3}\b')
|
||
|
print(shortword.sub('', text))
|