break syntax error: Syntax Error
What is wrong with my break? I don't get why it say that invalid syntax on my break when i compiled the code

<code> for index, (start, end) in enumerate(searchPFAM(fname)):
            
           with open('output_'+uniprotID+'-%s.txt' % index,'w') as fileinput:
              
                print start, end
                for item in lookup[uniprotID]:
                    item, start, end = map(int, (item, start, end)) #make sure that all value is int
                    if start <= item <= end:
                        print item
                        result = str(item - start)
                        fileinput.write(">{0} | at position {1} \n".format(uniprotID, result))
                        #text = fileinput.write(''.join(makeList[start-1:end]))
                        textwrap.fill(''.join(makeList[start-1:end],width = 60)
                        break
                else:
                        fileinput.write(">{0} | N/A\n".format(uniprotID))
                        #text = fileinput.write(''.join(makeList[start-1:end]))
                        textwrap.fill(''.join(makeList[start-1:end],width = 60)
</code>
break syntax error: Syntax Error
===

What is wrong with my break? I don't get why it say that invalid syntax on my break when i compiled the code

<code> for index, (start, end) in enumerate(searchPFAM(fname)):
            
           with open('output_'+uniprotID+'-%s.txt' % index,'w') as fileinput:
              
                print start, end
                for item in lookup[uniprotID]:
                    item, start, end = map(int, (item, start, end)) #make sure that all value is int
                    if start <= item <= end:
                        print item
                        result = str(item - start)
                        fileinput.write(">{0} | at position {1} \n".format(uniprotID, result))
                        #text = fileinput.write(''.join(makeList[start-1:end]))
                        textwrap.fill(''.join(makeList[start-1:end],width = 60)
                        break
                else:
                        fileinput.write(">{0} | N/A\n".format(uniprotID))
                        #text = fileinput.write(''.join(makeList[start-1:end]))
                        textwrap.fill(''.join(makeList[start-1:end],width = 60)
</code>