typeof

Determine the type of an object?

Determine the type of an object? Question: Is there a simple way to determine if a variable is a list, dictionary, or something else? Asked By: Justin Ethier || Source Answers: Use type(): >>> a = [] >>> type(a) <type ‘list’> >>> f = () >>> type(f) <type ‘tuple’> Answered By: brettkelly There are two …

Total answers: 15