raw_input("empty") d = {} for ii in xrange(5*1000*1000): d[ii] = u'string' raw_input("full") del d raw_input("empty")