fork download
  1. f=lambda a,b,r='',i=2:a and f(a[:-1],b,r+a+'\n')or(b[i-1:]and f(a,b,r+b[:i]+'\n',i+1)or r)
  2. print(f("Test", "Testing"))
  3. print(f("Hello!", "Hi."))
  4. print(f("O", "O"))
  5. print(f("z", "zz"))
  6. print(f(".vimrc", ".minecraft"))
  7. print(f(" ", " "))
  8. print(f('0123456789','02468'))
Success #stdin #stdout 0.03s 9576KB
stdin
Standard input is empty
stdout
Test
Tes
Te
T
Te
Tes
Test
Testi
Testin
Testing

Hello!
Hello
Hell
Hel
He
H
Hi
Hi.

O

z
zz

.vimrc
.vimr
.vim
.vi
.v
.
.m
.mi
.min
.mine
.minec
.minecr
.minecra
.minecraf
.minecraft

     
    
   
  
 
  
   

0123456789
012345678
01234567
0123456
012345
01234
0123
012
01
0
02
024
0246
02468