Sobes.tech
Junior — Middle

Welche Funktion in der Programmiersprache gibt den Typ des übergebenen Werts zurück?

sobes.tech KI

Antwort von AI

In der Programmiersprache Python gibt die Funktion type() den Typ des übergebenen Wertes zurück.

Beispiel:

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