Sobes.tech
Junior — Middle

Jaká funkce v programovacím jazyce vrací typ předané hodnoty?

sobes.tech AI

Odpověď od AI

V jazyce Python funkce type() vrací typ předané hodnoty.

Příklad:

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