'Iterate through the data and create the needed output1.txt file.'

def create_file(self):

    with open('output1.txt', 'a+') as output_file:
        for data_element in self.data:
            if data_element.get('name'):
                name = data_element.get('name')
                if ('()' in name):
                    name = name[:(-2)]
                code = data_element.get('code')
                first_paragraph = (('<p>' + data_element.get('first_paragraph')) + '</p>')
                second_paragraph = (('<p>' + data_element.get('second_paragraph')) + '</p>')
                abstract = '{}{}{}'.format((first_paragraph + second_paragraph), '', code)
                abstract = (('<section    class="prog__container">' + abstract) + '</section>')
                url = '{}{}'.format(data_element.get('url'), data_element.get('anchor'))
                list_of_data = [name, 'A', '', '', '', '', '', '', DJANGO_HOME, '', '', abstract, url]
                output_file.write('{}\n'.format(' DCTB '.join(list_of_data)))
