def continent(self, code: bool = False) -> str:
        """Get a random continent name or continent code.

        :param code: Return code of continent.
        :return: Continent name.
        """
        codes = CONTINENT_CODES if \
            code else self._data['continent']

        return self.random.choice(codes)
def continent ( self , code : bool = False ) -> str : codes = CONTINENT_CODES if code else self . _data [ 'continent' ] return self . random . choice ( codes )
Get a random continent name or continent code.

        :param code: Return code of continent.
        :return: Continent name.