# Task
 Timed Reading is an educational tool used in many schools to improve and advance reading skills. A young elementary student has just finished his very first timed reading exercise. Unfortunately he's not a very good reader yet, so whenever he encountered a word longer than maxLength, he simply skipped it and read on.

 Help the teacher figure out how many words the boy has read by calculating the number of words in the text he has read, no longer than maxLength.

 Formally, a word is a substring consisting of English letters, such that characters to the left of the leftmost letter and to the right of the rightmost letter are not letters.

# Example

 For `maxLength = 4` and `text = "The Fox asked the stork, 'How is the soup?'"`, the output should be `7`

 The boy has read the following words: `"The", "Fox", "the", "How", "is", "the", "soup".`

# Input/Output


 - `[input]` integer `maxLength`

    A positive integer, the maximum length of the word the boy can read.

    Constraints: `1 ≤ maxLength ≤ 10.`


 - `[input]` string `text`

    A non-empty string of English letters and punctuation marks.


 - `[output]` an integer

    The number of words the boy has read.

Difficulty: EASY
Starter code: def timed_reading(max_length, text):
	

Solutions:
import re

def timed_reading(max_length, text):
	return sum((len(i) <= max_length for i in re.findall('\\w+', text)))


def timed_reading(max_length, text):
	count = 0
	for punctuation_mark in '!.,?\'"_-)(':
		text = text.replace(punctuation_mark, '')
	listed_text = text.split(' ')
	for word in listed_text:
		if len(word) <= max_length and len(word) > 0:
			count += 1
	return count
print(timed_reading(4, "The Fox asked the stork, 'How is the soup?'"))


import re

def timed_reading(max_length, text):
	return sum((len(m.group()) <= max_length for m in re.finditer('\\w+', text)))


import re

def timed_reading(max_length, text):
	return len(re.findall('\\b\\w{1,%s}\\b' % str(max_length), text)) if max_length >= 2 else 0


timed_reading = lambda m, t: len([e for e in __import__('re').findall('\\w+', t) if len(e) <= m])


import string

def timed_reading(max_length, text):
	return len(list([x for x in text.split() if 1 <= len(x.strip(string.punctuation)) <= max_length]))


def timed_reading(max_l, text):
	string = text.translate(str.maketrans('`~!@\'"#№$;%:^&?*()-_+=/\\[]{}', '                            '))
	return sum(map(lambda x: len(x) <= max_l, (i for i in string.split() if i)))


def timed_reading(max_length, text):
	return sum([1 for w in text.split() if 0 < len(''.join(filter(str.isalpha, w))) <= max_length])


import re

def timed_reading(max_length, text):
	text = re.sub('[^\\w\\s]', '', text)
	cnt = 0
	for words in text.split():
		if len(words) <= max_length:
			cnt += 1
	return cnt


from re import sub

def timed_reading(max_length, text):
	return sum((len(word) <= max_length for word in sub('[^a-zA-Z ]*', '', text).split()))