find type of an element in list python

Solutions on MaxInterview for find type of an element in list python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "find type of an element in list python"
Esmay
03 Apr 2018
1mylist = ["hello", "world", 1, 2, 9999, "pizza", 42, ["this", "is", "a", "sub list"], -100]
2type(mylist[3])
3#int
4type(mylist[1])
5#str
6type(mylist[-2])
7#list
8type(mylist[-2][1])
9#str