%%bash python for_class/exciting_solution.py for_class/boring_file.txt exciting_file.txt && cat exciting_file.txt && rm exciting_file.txt
If you try to read a file that doesn't exist, you'll get a
If you try to write a file that doesn't exist, python will make it exist (this is typically exactly what we want).
If you try to read a file that exists, python opens the file and you can read it.
If you try to write a file that exists, python erases everything that used to be there and starts fresh.
With great power comes great responsibility
Measure twice, cut once.
Write a program that takes an input file and output file as commandline arguments.
For each line in the input file, write a line in the output file that has the corresponding number of "B", "Y", or "U" characters found in the input line. Ignore casing.
Your big book is ugly. Yuba is beyond.