Hey guys, I'm new to Python and programming in general, and I've come across a problem that I can't quite figure out in my experimentation with the random module. So, basically, I want the following code to ask the user to input a word, and then randomly print a single letter from that word.
word = raw_input("Enter a word: ")
wordsize = len(word)
randomnumber = random.randrange(0, wordsize)
Oddly, the program does what I want it to about half the time, while for the other half it simply prints "1". It also seems as if the larger the word I type in is, the more likely the program is to work. What's going on here? Any help would be appreciated, thanks.