
3
Utiliser Python en interactif
Utiliser Python en interactif
• Utilisation interactive
% python
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>
• ^D (control-D) termine l’exécution
>>> ^D
%
• Les commentaires commencent par ‘#’
>>> 2+2 # Commentaire sur la même ligne
4
>>> 7/3 # Les nombres sont entiers par défaut
2
>>> x = y = z = 0 # Affectation multiple
>>> z
0