Skip to main content
Commonmark migration
Source Link

#Python 2, 93 92 bytes

Python 2, 93 92 bytes

import random,time
def F(s):
 if s:n=random.randint(1,10);time.sleep(n);print s[:n];F(s[n:])

-1 byte thanks to Flp.Tkc

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

#Python 2, 93 92 bytes

import random,time
def F(s):
 if s:n=random.randint(1,10);time.sleep(n);print s[:n];F(s[n:])

-1 byte thanks to Flp.Tkc

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

Python 2, 93 92 bytes

import random,time
def F(s):
 if s:n=random.randint(1,10);time.sleep(n);print s[:n];F(s[n:])

-1 byte thanks to Flp.Tkc

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

added 40 characters in body
Source Link
acrolith
  • 4k
  • 1
  • 24
  • 41

#Python 2, 9393 92 bytes

import random,time
i=inputdef F(s):
while iif s:n=random.randint(1,10);time.sleep(n);print i[s[:n];i=i[nn];F(s[n:])

-1 byte thanks to Flp.Tkc

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

#Python 2, 93 bytes

import random,time
i=input()
while i:n=random.randint(1,10);time.sleep(n);print i[:n];i=i[n:]

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

#Python 2, 93 92 bytes

import random,time
def F(s):
 if s:n=random.randint(1,10);time.sleep(n);print s[:n];F(s[n:])

-1 byte thanks to Flp.Tkc

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...

Source Link
acrolith
  • 4k
  • 1
  • 24
  • 41

#Python 2, 93 bytes

import random,time
i=input()
while i:n=random.randint(1,10);time.sleep(n);print i[:n];i=i[n:]

I'm sure there is a way to shorten the random.randint and time.sleep, but from random,time import* doesn't work...