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?
to get the first non empty string in a list, you just have to loop over it and check if its not empty. that's all there is to it.
arr = ['','',2,"one"] for i in arr: if i: print i break