Okay, so lets say you have a list:

funList = [1,2,3,4,5]

and you do:

for x in funList:
      print x

this will print 1-5
But I am wondering is there a way to something like this:

funString = "string string string non-string non-string string"
and
for "string" in funString:
      print something

I know you can't do that; but, is there a way do do something similar that
gets the same result?
-- 
View this message in context: 
http://www.nabble.com/like-a-%22for-loop%22-for-a-string-tp19022098p19022098.html
Sent from the Python - python-list mailing list archive at Nabble.com.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to