Write a program using python that loops over each file in a specified directory and checks...

60.1K

Verified Solution

Question

Programming

Write a program using python that loops over each file in aspecified directory and checks the size of each file.You shouldcreate 2-tuple with the filename and size, should append the2-tuple to a list, and then store all the lists in adictionary.  

Answer & Explanation Solved by verified expert
3.7 Ratings (625 Votes)
RAWCODEimport ospath homeabhishekPictures Directory path herefiles oslistdirpath This will list all the files in a    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students