Mémoire !
This commit is contained in:
parent
6d44f9251a
commit
67ff013102
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from random import *
|
from random import *
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from sys import stdout
|
||||||
|
|
||||||
def dire(propositions="", fin="\n"):
|
def dire(propositions="", fin="\n"):
|
||||||
if propositions == "":
|
if propositions == "":
|
||||||
|
@ -10,6 +11,7 @@ def dire(propositions="", fin="\n"):
|
||||||
phrase = choice(propositions)
|
phrase = choice(propositions)
|
||||||
for i in range(0, len(phrase)):
|
for i in range(0, len(phrase)):
|
||||||
print(phrase[i], end='')
|
print(phrase[i], end='')
|
||||||
|
stdout.flush()
|
||||||
if phrase[i] in ['.', ',', '!', '?', '\n']:
|
if phrase[i] in ['.', ',', '!', '?', '\n']:
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
else:
|
else:
|
||||||
|
|
Reference in a new issue