[Tutor] Iterating over a list for a certain character...

Sean 'Shaleh' Perry shalehperry@attbi.com
Thu, 13 Dec 2001 14:55:26 -0800 (PST)

On 13-Dec-2001 Brett Kelly wrote:
> ok, i have read a file into a list of strings, and i need to copy out all of
> the strings that contain a certain character, sort them, and print them.
> how would i do that?

take a look at:

>>> c = 's'
>>> c in 'streets'