NumToWord
#@roshanb79 def convToWord(num): sflw=[] lastc='' uth="" for i in reversed(num): if len(sflw)==0: #checking is list is empty sflw.append(numwords1[i]) uth+="unit:"+i elif len(sflw)==1: uth+=",tens:"+i if i=="0": sflw.append("") elif lastc=="0": sflw[0]="" sflw.append(numwords3[i]) elif i=="1": sflw.pop(0) sflw.append(numwords2[lastc]) else: sflw.append(numwords3[i]) elif len(sflw)==2: uth+=",hundred:"+i if i=="0": sflw.append("") else: if sflw[0]=="" and sflw[1]=="": sflw.append(numwords1[i]+" Hundred") else: sflw.append(numwords1[i]+" Hundred And ") else: print("Give Number between 0-999") lastc=i finalword="" for word in reversed(sflw): finalword+=word print(finalword) print(...