def address_pairs(fields):
 pairs = list(zip(fields[::2], fields[1::2]))
 if (len(fields) % 2):
  pairs.append(fields[(-1)])
 return pairs

def address_pairs ( fields ) : pairs = list ( zip ( fields [ : : 2 ] , fields [ 1 : : 2 ] ) ) if ( len ( fields ) % 2 ) : pairs . append ( fields [ ( - 1 ) ] ) return pairs
zips address fields into pairs .