3 saved three characters by remembering that True and 1 are the same thing

## Python 2.7: 198195 - 20 = 178175

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[i[:]for i in[[' ']*100]*50]
while True1:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

## Python 2.7: 198 - 20 = 178

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[i[:]for i in[[' ']*100]*50]
while True:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

## Python 2.7: 195 - 20 = 175

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[i[:]for i in[[' ']*100]*50]
while 1:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

2 cut a bunch of characters using n.st's method of declaring the 2D array

## Python 2.7: 214198 - 20 = 194178

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[[' 'for n in range(100)l=[i[:]for i inin[[' range(50)]']*100]*50]
while True:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

## Python 2.7: 214 - 20 = 194

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[[' 'for n in range(100)]for i in range(50)]
while True:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

## Python 2.7: 198 - 20 = 178

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[i[:]for i in[[' ']*100]*50]
while True:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.

1

## Python 2.7: 214 - 20 = 194

I'm sure there's more that can be done here, but this is what I've got for now:

import os,time
from random import*
l=[[' 'for n in range(100)]for i in range(50)]
while True:
os.system('clear')
l[randint(0,49)][randint(0,99)]='.'
print'\033[94m\n'.join(''.join(r)for r in l)
time.sleep(.05)


I'll post a gif of the output when I remember how to do that.

This works on linux. Replacing 'clear' with 'cls' makes it work on windows, but then ANSI colours don't work and I lose the bonus.

I have a 2D array of one-character strings, initialized to . Every 0.05 seconds, one of them is chosen at random set to ., and the screen is redrawn.

from random import* saves two characters over import os,time,random and using random.randint() twice, though I'm not convinced that's the best way to choose a cell anyway. I wanted to use random.choice() but I couldn't think of a way around immutable strings that wouldn't waste more characters than it saved.