row='12345aj' for i in range(0,len(row)): if i==4: continue else: print i C:Python27python.exe C:/Users/TLCB/PycharmProjects/untitled/core/a26.py 0 1 2 3 5 6