Some exercises to get you thinking about Python and pointing out some of what you can do with it.
- How do you ask if a file exists?
- How to you ask if a file is a directory?
- How do you remove (delete) a file?
- How do you get the size of a file?
- How do you get all the file names matching a pattern?
- How do you get all the file names matching a pattern recursively?
- How do you get an iterator to all files matching a pattern, as opposed to returning a potentially huge list?
- How do you open gzip-compressed files for reading and for writing?
Same questions. Except 7, which has no analog.
Download this and expand it. It contains input (data) files and output (result) files. But, something went wrong and not all the output files were created. Generate a list of those output files that were not created. Do it in R and in Python. Which is easier/less annoying?