def wordrelationships(relationshiplist):
 relationships = etree.fromstring('<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>')
 count = 0
 for relationship in relationshiplist:
  rel_elm = makeelement('Relationship', nsprefix=None, attributes={'Id': ('rId' + str((count + 1))), 'Type': relationship[0], 'Target': relationship[1]})
  relationships.append(rel_elm)
  count += 1
 return relationships

def wordrelationships ( relationshiplist ) : relationships = etree . fromstring ( '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>' ) count = 0 for relationship in relationshiplist : rel_elm = makeelement ( 'Relationship' , nsprefix = None , attributes = { 'Id' : ( 'rId' + str ( ( count + 1 ) ) ) , 'Type' : relationship [ 0 ] , 'Target' : relationship [ 1 ] } ) relationships . append ( rel_elm ) count += 1 return relationships
generate a word relationships file .