Month: March 2022

Managing Files And Folders Using Python

Managing Folders and Files using Python¶ Let us quickly recap details about folders and files, especially using Linux. You need to be comfortable with the following. Differentiating Files and Folders. Keep in mind that Folders and Directories means the samething. Understanding Absolute or Fully Qualified Path. Understanding Relative Path. Understanding File or Folder permissions. We …

Managing Files And Folders Using Python Read More »

Write Strings to File in Append Mode

Write strings to file in append mode¶ Let us see how we can write multiple strings from a list to file in append mode. We cannot write the list of strings into file properly all at once. In [1]: departments = [ ‘2,Fitness’, ‘3,Footwear’, ‘4,Apparel’, ‘5,Golf’, ‘6,Outdoors’, ‘7,Fan Shop’ ] In [2]: file = open(‘data/departments.txt’, ‘w’) In [3]: …

Write Strings to File in Append Mode Read More »