How to print the variable?

Cristiano Paris frodo at theshire.org
Wed Feb 14 08:59:47 EST 2007


Hans Schwaebli wrote:
> Hi,
>  
> am am a Python beginner with Java knowledge background. Infact I need to 
> use Jython.
>  
> My first beginner question is how to determine of what type a variable is?

Let v be the var, 'print type(v)' should* work. [* I've never used 
Jython before].

You can print any variable using the 'print' statement. If you want to 
be pedantic, surround the variable name with the str() built-in.

Cristiano



More information about the Python-list mailing list