Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
import Image as I
f=1000
a=Ia=Image.new('RGB',(f,f))
p=a.load()
r=range(f)
for i in range(f)r:
for j in range(f)r:p[i,j]=(i*16&j*16,)*3
a.save('s.png')
Python - 132 chars
Creates a Sierpinski triangle.
import Image as I
f=1000
a=I.new('RGB',(f,f))
p=a.load()
for i in range(f):
for j in range(f):p[i,j]=(i*16&j*16,)*3
a.save('s.png')
Python - 128 chars
Creates a Sierpinski triangle.
import Image
f=1000
a=Image.new('RGB',(f,f))
p=a.load()
r=range(f)
for i in r:
for j in r:p[i,j]=(i*16&j*16,)*3
a.save('s.png')
deleted 3 characters in body; deleted 14 characters in body; deleted 1 character in body