HW Week 2: Python Program

For this week I created a fairly simple python program that evaluates the length of the line by 25 characters, then prints out the line to only include up to 10 character with title and swap cases. Because the text I have been using is a large book Wealth of a Nation, I also needed to continue the breakdown of text further, so I used the grep to narrow the selection even further. The best result I got is shown below: 

code of python:

import sys
for line in sys.stdin:
    line = line.strip()
    if len(line) <= 25:
       print line[:10].title().swapcase()

code in terminal: grep that <wealth.txt | python statement.py 


HW Week 3

HW Week 1: Unix Poem