def plural form1 form2 form3 plural if 10 and 100 11 else if 10 and 10

1
2
3
4
5
6
7
8
def plural(n, form1, form2, form3):
plural = 1 if n % 10 == 1 and n % 100 != 11 else 2 if n % 10 >= 2 and n % 10 <= 4 and n % 100 < 10 or n % 100 >= 20 else 3
return {
1: str(n) + ' ' + form1,
2: str(n) + ' ' + form2,
3: str(n) + ' ' + form3
}[plural]