In Python I have a list of strings, some of which may be the empty string. What\'s the best way to get the first non-empty string?
next(s for s in list_of_string if s)
Edit: py3k proof version as advised by Stephan202 in comments, thanks.