A Blog About Anime, Code, and Pr0 H4x

Look-And-Say Sequence Generator

October 10, 2011 at 12:00 PM

This program generates a look-and-say sequence to however many lines it's instructed to do.

Example output:

bossman:/code/python$ ./lookandsay.py
          lines: 10
          1
          11
          21
          1211
          111221
          312211
          13112221
          1113213211
          31131211131221
          13211311123113112211
          

Download: lookandsay.py

Go to Page