Word in list


#1

Hello does anybody knows how to check for a word in list or element without separating it into one digit or character? For example:

list=[324,54,1,word]
for element in list:
print element,

will output 3,2,4,5,4,1,w,o,r,d (vertically) instead of 324,54,1,word (vertically) Is there a command to do it? Thanks.


#2

No, that'll just trigger a NameError: word is not defined
and if you had "word" instead, it would print:

324 54 1 word

Which is horizontal, not vertical!

And that's only after first indenting your third line.

What you're saying doesn't add up!

If what you want to do is print out one character at a time, each on a line, then you can convert it all to a single string and print out one character at a time.