Type of all elements in Python list -


is there way print out type of all elements of given list in python?

for example [1, 2, 3.5] give int, int, float.

the closest existing resource i've found answering question is: test type of elements python tuple/list, gives holistic true/false outputs (which not i'm looking for).

try following:

for l in lst:     print(type(l)) 

where lst = [1,2,3.5]


Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

android - Linear layout children not scrolling -