#!/usr/local/bin/python2 from itertools import chain l = [1] c = chain(l) l.append(3) for i in c: print i