-6

I made a function where it prints words slowly. Its very nice, but I like to mess around with it every now and then but now I am trying to use """ with it but it will not work. I used it a while back and it worked fine but I can't seem to make it work without getting a syntax error.

here is my code.

# -*- coding: utf-8 -*-
import time
import sys

def delay_print(s):
    for c in s:
        sys.stdout.write( '%s' % c )
        sys.stdout.flush()
        time.sleep(0.01)

delay_print """

Test

"""
tripleee
  • 175,061
  • 34
  • 275
  • 318
KwaziMoto
  • 19
  • 2

1 Answers1

3

You need parentheses around the function's argument(s).

delay_print("""
Test
""")
tripleee
  • 175,061
  • 34
  • 275
  • 318