fork(6) download
  1. # This Python 3 code defines a function f which takes a string containing
  2. # only ASCII letters plus spaces and linebreaks as argument.
  3. # It outputs a string consisting of " " and "1" that represents the input text in a large ASCII art
  4. # The code length is 375 bytes (or characters).
  5. f=lambda i:"\n\n".join("\n".join(map(" ".join,zip(*[[x.replace("0"," ")[a*5:a*5+5]for a in range(5)]for x in[["{:025b}".format(int(c,36))for c in'0 JPCFL J2UKE 92Y3Y J2KAM JOMCF JOMC0 92B72 AYP81 JFM3J JFMHO AZC7M AB6ZJ B5I5T B43N5 92YWE J2UJ4 92YY7 J2UQC 926UM JFM2S AYE5Q AY8G4 AYHKH AT6Q9 AT6KK AWU7'.split()][x!=" "and ord(x)-64]for x in j.upper()]])))for j in i.split("\n"))
  6.  
  7. # Here's a usage example:
  8. print(f("Hello World\nPython rocks"))
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
1   1 11111 1     1      111        1   1  111  1111  1     1111 
1   1 1     1     1     1   1       1   1 1   1 1   1 1     1   1
11111 1111  1     1     1   1       1 1 1 1   1 1111  1     1   1
1   1 1     1     1     1   1       11 11 1   1 11    1     1   1
1   1 11111 11111 11111  111        1   1  111  1 1   11111 1111 

1111  1   1 11111 1   1  111  1   1       1111   111   111  1   1  111 
1   1  1 1    1   1   1 1   1 11  1       1   1 1   1 1   1 1  1  1    
1111    1     1   11111 1   1 1 1 1       1111  1   1 1     111    111 
1       1     1   1   1 1   1 1  11       11    1   1 1   1 1 1       1
1       1     1   1   1  111  1   1       1 1    111   111  1  1   111