![]() ![]() The filename project.docx is a Word document, and Users, Al, and Documents all refer to folders (also called directories). The part of the filename after the last period is called the file’s extension and tells you a file’s type. For example, there is a file on my Windows laptop with the filename project.docx in the path C:\Users\Al\Documents. The path specifies the location of a file on the computer. Files and File PathsĪ file has two key properties: a filename (usually written as one word) and a path. In this chapter, you will learn how to use Python to create, read, and save files on the hard drive. ![]() You can think of a file’s contents as a single string value, potentially gigabytes in size. ![]() Variables are a fine way to store data while your program is running, but if you want your data to persist even after your program has finished, you need to save it to a file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |