#!/usr/bin/env python

from string import strip, upper

f = open('map.txt')
lines = f.readlines()
f.close()

print 'BEFORE:\n'
for eachLine in lines:
    print '[%s]' % eachLine[:-1]

print '\nAFTER:\n'
for eachLine in map(upper, 
        map(strip, lines)):
    print '[%s]' % eachLine

