def cif(self):
        """
        https://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
        :return: a random Spanish CIF
        """

        first_chr = random.choice('ABCDEFGHJNPQRSUVW')
        doi_body = str(random.randrange(0, 10000000)).zfill(7)
        cif = first_chr + doi_body
        return cif + self._calculate_control_cif(cif)
def cif ( self ) : first_chr = random . choice ( 'ABCDEFGHJNPQRSUVW' ) doi_body = str ( random . randrange ( 0 , 10000000 ) ) . zfill ( 7 ) cif = first_chr + doi_body return cif + self . _calculate_control_cif ( cif )
https://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
        :return: a random Spanish CIF