Hello Freecodecamp,
I’m following the 4.5hr Beginner youtube tutorial on python & came across an issue.
I have the exact same code & file structure as the tutorial, with the only difference being that the tutorial is using Pycharm & I am using Visual Studio.
Thing is that when I run my code to append the employees.txt file code shown below, the string is added to the last line in the employees.txt file–not added to a new line. I can get around it using the “\n”…but I was wondering if this is an update to python or is it because I am using a code editor vs an IDE. ??
## My code Using "a" append
employee_file = open("employees.txt", "a")
employee_file.write("\nToby - Human Resources")
employee_file.close()
## Freecodecamp.org code
employee_file = open("employees.txt", "a")
employee_file.write("Toby - Human Resources")
employee_file.close()