From 67ff0131023e8d0c0eb7b5a76f15f7c4130e81a5 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Tue, 16 Dec 2014 18:50:02 +0100 Subject: [PATCH] =?UTF-8?q?M=C3=A9moire=20!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- S1/TP 4/plusOuMoinsYOLO.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/S1/TP 4/plusOuMoinsYOLO.py b/S1/TP 4/plusOuMoinsYOLO.py index ded7112..c1e24aa 100644 --- a/S1/TP 4/plusOuMoinsYOLO.py +++ b/S1/TP 4/plusOuMoinsYOLO.py @@ -2,6 +2,7 @@ from random import * from time import sleep +from sys import stdout def dire(propositions="", fin="\n"): if propositions == "": @@ -10,6 +11,7 @@ def dire(propositions="", fin="\n"): phrase = choice(propositions) for i in range(0, len(phrase)): print(phrase[i], end='') + stdout.flush() if phrase[i] in ['.', ',', '!', '?', '\n']: sleep(0.5) else: