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

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -