Computing average grades for students in a class
For conciseness in Python, the key is to think in terms of applying functions using map and list comprehensions, rather than thinking procedurally.  In this problem, it is very important to define a mean() function.  Once you do that, the calculations themselves are one-liners.

The main objection I had to your code was that you mangled the data structure by appending each student's average at the end of his grades.  Don't do that — student_means() should just return a fresh dict instead.

I've taken out the non-essential prompt for the number of assignments; you can easily put it back.

""" Simple student grade manager"""

from fileinput import input

def mean(list):
    return sum(map(float, list)) / len(list) \
      if len(list) &gt; 0 else float('nan')

def import_student_grades(grades_file):
    """
    Given a filename, reads data into a dict whose keys are student names
    and whose values are grades (as strings).
    """
    line_words = [line.split() for line in input(grades_file)]
    return dict((words[0], words[1:]) for words in line_words)

def main():
    grades_file = raw_input('File name: ')
    student_grades = import_student_grades(grades_file)
    student_means = dict((k, mean(v)) for k, v in student_grades.iteritems())

    print 'class average: %0.2f' % mean(student_means.values())
    for name, grades in student_grades.iteritems():
        print 'name: %(name)s | grades: %(grades)s | average: %(avg)0.2f' % {
            'name': name,
            'grades': ' '.join(grades),
            'avg': student_means[name],
        }

if __name__ == '__main__':
    main()