/* */

Tuesday 22 March 2011

Index

Knights = ['Richard', 'of ', 'York', 'Gave', 'Battle', 'in', 'vein']
Knights.index('York')
2
Knights.index('pudding')
-error

Finds the word in the list and returns its position.

No comments:

Post a Comment