I want to use split() method for separating rupees and paise. In paise part it is showing 6 paise for 60 paise, 7 for 70 and so on.But if the paise is 44 it will show correctly.Is it not considering zero if it is at the end? [rupees and paise are Indian currency]
from num2words import num2words
pre=405068.60
text1 = ''
text2 = ''
result1 = ''
result2 = ''
entire_num = int((str(pre).split('.'))[0])
decimal_num = int((str(pre).split('.'))[1])
print "Decimal number=%d" %decimal_num
text1=num2words(entire_num, lang='en_IN').capitalize()
text2=num2words(decimal_num, lang='en_IN')
result1=text1+' '+'rupees'
if(decimal_num>0):
result2 = ' and '+text2+' paise'
print result1+result2