MRMCD12 deutsche zahlen by p2k

a=[""]+"ein zwei drei vier fuenf sechs sieben acht neun zehn elf zwoelf".split()
b="zwanzig dreissig vierzig fuenfzig sechzig siebzig achzig neunzig".split()
i=input()
j=i%10
r=""
if i<1:r="null"
if i/1000:r=a[i/1000]+"tausend";i%=1000
if i/100:r+=a[i/100]+"hundert";i%=100
if i<13:a[1]="eins";r+=a[i]
elif i<20:r+=a[j]+a[10]
else:r+=(a[j] and a[j]+"und")+b[i/10-2]
print r

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top