fork download
  1. import random
  2. comments = [' ',' ',' #this is a loop',' #is this tehcnically a quine?',' #small optimization']
  3. code = ['+/u/CompileBot python', 'import random', 'comments = ', 'code = ', 'code[2] = code[2] + str(code)', 'code[1] = code[1] + str(comments)', 'for i in code:', ' print(i + random.choice(comments))']
  4. code[2] = code[2] + str(code)
  5. code[1] = code[1] + str(comments)
  6. for i in code:
  7. print(i + random.choice(comments))
Success #stdin #stdout 0.02s 11448KB
stdin
Standard input is empty
stdout
+/u/CompileBot python #small optimization
import random[' ', ' ', ' #this is a loop', ' #is this tehcnically a quine?', ' #small optimization'] 
comments = ['+/u/CompileBot python', 'import random', 'comments = ', 'code = ', 'code[2] = code[2] + str(code)', 'code[1] = code[1] + str(comments)', 'for i in code:', '    print(i + random.choice(comments))'] #is this tehcnically a quine?
code =  
code[2] = code[2] + str(code) #this is a loop
code[1] = code[1] + str(comments) 
for i in code: 
    print(i + random.choice(comments))