New to group
george.sakkis at gmail.com
Mon Mar 24 20:13:59 CET 2008
On Mar 24, 3:03 pm, pythonnubie <exxf... at hotmail.com> wrote:
> On Mar 24, 11:57 am, Jeff <jeffo... at gmail.com> wrote:
> > What does the code look like?
> # Random Access
> # Demonstrates string indexing
> # Michael Dawson - 1/27/03
> import random
> word = "index"
> print "The word is: ", word, "\n"
> high = len(word)
> low = -len(word)
> for i in range(10):
> position = random.randrange(low, high)
> print "word[", position, "]\t", word[position]
> raw_input("\n\nPress the enter key to exit.")
> The code is an exerp from a chm file . I am petty sutre I am
> nmot getting a char map error from the copy/paste ! it looks
> simple enough !
It works fine on on Windows with standard Python 2.5. Something is
probably wrong with your ActiveState installation.
More information about the Python-list