So I'm a beginner in python and I was trying the append commands. It worked very well with strings but not with floats. I used this:
Num1 = float(input("Enter 1st num: "))
Num2 = float(input("Enter 2nd num: "))
Salary = num1 - num2
employee_file = open("employee_salary.txt", "a")
employee_file.write(salary)
employee_file.close()
I know I could just remove float() from input but that was just an example, my program in more complicated than that and I don't want to remove float(). Is there any command to append float to a text file? Please help me.