[Python] Convert a python 'type' object to a string

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    I'm wondering how to convert a python 'type' object into a string using python's reflective capabilities.

    For example, I'd like to print the type of an object

    print("My type is " + type(some_object)) # (which obviously doesn't work like this)

    Continue reading...

Compartilhe esta Página