Sreeraj schrieb:
> hi,
> 
>  I am a beginner in Python. I wish to know how can i filter a list of
> strings using wild characters.ie
> Lets say i have list countries =
> ["india","africa","atlanta","artica","nigeria"]. I need only the list
> of string starting with 'a'.

While the startswith-method others pointed out works, I wanted to direct 
you attention to the module fnmatch.

http://www.python.org/doc/current/lib/module-fnmatch.html

It will work with real wildcards.

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

Reply via email to