Write a Python code to read an integer in a file e.g 123 and convert it to words e.g One hundred and twenty three and write the result back to the same file such that your file will have "123 One hundred and twenty three " in it
Created 4 years ago
1991
Views
2
Comments
from num2words import num2words
o = open("abc.txt", "a")
f = int(input("enter the number"))
o.write(str(f))
o.write(str(print(num2words(f))))
o.close()
hello sir im try too add out put in same file but its show me non pls help me
how can i solved this ???