Python dictionary (Dictionary) type () method
description
Python dictionary (Dictionary) type () function returns the input variable type, if the variable is a dictionary returns a dictionary.
grammar
type () method syntax:
type(dict)
parameter
- dict - dictionary.
return value
Returns the type of input variables.
Examples
The following example shows the type () function to use:
#!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7}; print "Variable Type : %s" % type (dict)
The above example output is:
Variable Type : <type 'dict'>