* y j <[email protected]> [2014-03-18 16:41]: > how can i split a word into letters in python 2.7.6?
Strings can already be accessed as arrays: >>> s='foobar' >>> print s[2] o >>> print s[4] a >>> print s[7] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: string index out of range >>> Can you be a little clearer what you need? Are you looking to store them in variables, an array, print them? If printing them, are you looking to output one per line, or spaced out? -- David Rock [email protected] _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
