Sobes.tech
Junior — Middle

Qual funzione nel linguaggio di programmazione restituisce il tipo del valore passato?

sobes.tech AI

Risposta dell'AI

Nel linguaggio Python, la funzione type() restituisce il tipo del valore passato.

Esempio:

print(type(10))        # <class 'int'>
print(type('ciao'))    # <class 'str'>
print(type([1, 2, 3])) # <class 'list'>