Learn Python the Hard Way - How to use +=
Question: Currently on exercise 20, study drill 5. The code is thus:

    
    
    from sys import argv 
    
    script, input_file = argv 
    
    def print_all(f): 
        print f.read()
    
    def rewind(f): 
        f.seek(0)
    
    def print_a_line(line_count, f): 
        print line_count, f.readline()
    
    current_file = open(input_file)
    
    print 'first of all, lets read the wole file:\n'
    
    print_all(current_file)
    
    print 'now lets rewind, kind of like a tape'
    rewind(current_file)
    
    print 'lets print 3 lines:'
    
    current_line = 1
    print_a_line(current_line, current_file)
    
    current_line = current_line + 1
    print_a_line(current_line, current_file)
    
    current_line = current_line + 1
    print_a_line(current_line, current_file)
    

Study drill 5 asks me to: Research the shorthand notation += and rewrite the
script to use that.

I have looked up +=, but have no idea how to use it in the above code.

**PLEASE NOTE - I would appreciate it if you could give me just 1 example, and
not re-write the entire code for me...I don't mean to be rude, but I would
like to work out the rest if possible.**


Answer: Short notation of `a += b` is equivalent to `a = a + b` and you can use this
`+=` in place of `current_line = current_line + 1` replacing it with
`current_line += 1`

