Re: [Tutor] ok i need some help with a for loop

2009-10-15 Thread Christian Witts
Skylar Struble wrote: ok so im working on a text based rpg game and am trying to get this code to work, items = ['crate', 'grave'] lookwords = ['look', 'examine', 'investigate','open') input1 = raw_input('What do you want to do:') for word in items: for word2 in lookwords: if word a

Re: [Tutor] ok i need some help with a for loop

2009-10-15 Thread Michiel Overtoom
Skylar Struble wrote: lookwords = ['look', 'examine', 'investigate','open') The ')' probably has to be a ']'. if word and word2 in input1: Try this: if (word in input1) and (word2 in input1): it prints out all of the print things 2 times when i want it to print 1 or the other

[Tutor] ok i need some help with a for loop

2009-10-15 Thread Skylar Struble
ok so im working on a text based rpg game and am trying to get this code to work, items = ['crate', 'grave'] lookwords = ['look', 'examine', 'investigate','open') input1 = raw_input('What do you want to do:') for word in items: for word2 in lookwords: if word and word2 in input1: