saving . . . saved How to enter the file name under which to save a figure in Python under Windows 7 has been deleted. How to enter the file name under which to save a figure in Python under Windows 7 has been hidden .
How to enter the file name under which to save a figure in Python under Windows 7
Title
Question
I am learning Python using Python version 3.8 installed in my computer running Windows 7.  The tutorial at 3m10 seconds states that I should use the function savefig("C:/Users/fossee/Desktop/sine.png") when running Python under Windows.   Would it not be more appropriate to use the command with backslashes instead of forward slashes?    The argument to the function would then read,   savefig("C:\Users\fossee\Desktop\sine.png")?

Python-3.4.3 Saving-plots 03-04 min 10-20 sec 30-04-20, 4:13 p.m. HSSrinivasPrasad

Answers:

savefig("C:\Users\fossee\Desktop\sine.png") is correct 
01-05-20, 12:27 a.m. aditya94palaparthy@gmail.com


Log-in to answer to this question.