LearnPy Hub
← All topics
Topic Practice · Intermediate

File Handling problems

50 problems: 22 Easy, 18 Medium, 10 Hard.

Review the File Handling lesson
✓1. Write and Read
4 test cases
EasyNot tracked
✓2. Count Lines
4 test cases
EasyNot tracked
✓3. Append Lines
4 test cases
EasyNot tracked
✓4. Sum From a File
4 test cases
EasyNot tracked
✓5. Copy in Upper Case
4 test cases
EasyNot tracked
✓6. Missing File
4 test cases
EasyNot tracked
✓7. Write Many Lines at Once
4 test cases
EasyNot tracked
✓8. Only the First Line
4 test cases
EasyNot tracked
✓9. Length of Every Line
4 test cases
EasyNot tracked
✓10. Does the File Exist?
4 test cases
EasyNot tracked
✓11. Write Two Lines
4 test cases
EasyNot tracked
✓12. Characters in a File
4 test cases
EasyNot tracked
✓13. readlines() as a List
4 test cases
EasyNot tracked
✓14. w Replaces the File
4 test cases
EasyNot tracked
✓15. Append and Count
4 test cases
EasyNot tracked
✓16. Words in the File
4 test cases
EasyNot tracked
✓17. Print With Line Numbers
4 test cases
EasyNot tracked
✓18. Largest Number in a File
4 test cases
EasyNot tracked
✓19. Copy in Small Letters
4 test cases
EasyNot tracked
✓20. Is the Word in the File?
4 test cases
EasyNot tracked
✓21. Read the First Few Characters
4 test cases
EasyNot tracked
✓22. Count Empty Lines
4 test cases
EasyNot tracked
✓23. Words in a File
4 test cases
MediumNot tracked
✓24. Longest Line
4 test cases
MediumNot tracked
✓25. CSV Average
4 test cases
MediumNot tracked
✓26. Filter a CSV
4 test cases
MediumNot tracked
✓27. Reverse a File
4 test cases
MediumNot tracked
✓28. Number the Lines
4 test cases
MediumNot tracked
✓29. Search a File
4 test cases
MediumNot tracked
✓30. Save as JSON
4 test cases
MediumNot tracked
✓31. The Last k Lines
4 test cases
MediumNot tracked
✓32. Write and Read a CSV
4 test cases
MediumNot tracked
✓33. Read a CSV by Column Name
4 test cases
MediumNot tracked
✓34. Find and Replace in a File
4 test cases
MediumNot tracked
✓35. Sort a File
4 test cases
MediumNot tracked
✓36. Three Most Common Words
4 test cases
MediumNot tracked
✓37. Tab-Separated File to a Table
4 test cases
MediumNot tracked
✓38. File Size in Bytes
4 test cases
MediumNot tracked
✓39. Jump Around With seek()
4 test cases
MediumNot tracked
✓40. Write a CSV With DictWriter
4 test cases
MediumNot tracked
✓41. Most Common Letter in a File
4 test cases
HardNot tracked
✓42. Merge Two Files
4 test cases
HardNot tracked
✓43. Grade Report
4 test cases
HardNot tracked
✓44. Remove Duplicate Lines
4 test cases
HardNot tracked
✓45. Read a Config File
4 test cases
HardNot tracked
✓46. Column Totals
4 test cases
HardNot tracked
✓47. Split Into Two Files
4 test cases
HardNot tracked
✓48. Update a JSON File
4 test cases
HardNot tracked
✓49. Log File Report
4 test cases
HardNot tracked
✓50. Join Two CSV Files
4 test cases
HardNot tracked
← Back to all topics
File Handling practice problems · LearnPy Hub