Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

premier essais dans l'interface python 3.1

2 réponses
Avatar
DGBR
Voil=E0 je vien de t=E9l=E9charger la toute derni=E8re version sur mon PC e=
t
simplement lancer l'instruction print
d=E9sol=E9 mais je ne comprend pas
Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "teste"
SyntaxError: invalid syntax (<pyshell#0>, line 1)

Alors que la m=EAme chose sous
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> print "test"
test
>>>

Je pige pas

2 réponses

Avatar
Bruno Desthuilliers
DGBR a écrit :
Voilà je vien de télécharger la toute dernière version sur mon PC et
simplement lancer l'instruction print



http://docs.python.org/dev/3.0/whatsnew/3.0.html#print-is-a-function
Avatar
pdorange
DGBR wrote:

[...]
Je pige pas



Je te recommande de consulter au minimum cette doc avant de te lancer
avec Python 3.x :

<http://docs.python.org/dev/3.0/whatsnew/3.0.html&gt;

ou <http://diveintopython3.org/&gt;

Sinon pour te donner ta réponse sans lecture :

print("test")

--
Pierre-Alain Dorange <http://microwar.sourceforge.net/&gt;

Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/&gt;