In 24 pattern re compile а-яА-Я -_ 20 In 25 ля-ля-ля In 26 print patte

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
In [24]: pattern = re.compile(r'[а-яА-Я \d\-_\.]{3,20}')
In [25]: y = 'ля-ля-ля'
In [26]: print pattern.findall(y)[0]
-------> print(pattern.findall(y)[0])
ля-ля-ля
In [27]: y = 'тру-ля-ля'
In [28]: print pattern.findall(y)[0]
-------> print(pattern.findall(y)[0])
-ля-ля
In [29]: