Mini-Tutorial Python

Primeros pasos

[skina@calypso python]$ python
Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux (egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 1+1
2
>>> 3*4+5 
17
>>> a=12
>>> a     
12
>>> "Hola"
'Hola'
>>>
      

Scripts

--------------------------------
print "Hello, World!"
--------------------------------

$ python hello.py
Hello, World!

--------------------------------
#!/usr/bin/env python
print "Hello, World!"
--------------------------------

$ hello.py
Hello, World!
      
AnteriorInicioSiguiente