0
type(hh)==?
hh=[2,3] print(type(hh)) output==> <class 'list'> But when I write this--> if type(hh)==<class 'list'>: print('ok') It shows syntax error. When I write if type(hh)=="<class 'list'>": print('ok') It doesnât print anything Also when I write if type(hh)=='list': print('ok') still it doesnât print anything. How to make the if clause work?
2 Answers
+ 2
https://www.google.com/amp/s/www.geeksforgeeks.org/type-isinstance-JUMP_LINK__&&__python__&&__JUMP_LINK/amp/
Maybe this will help you!!
+ 1
Rishav Tiwari thanks! A good article to read and learn from



