I know in PHP or Java you can do something like this
int usefulCharacters = text == null ? 0 : text.length();
So in Python i want to check if after using the filter(item,iterable) function and return true if item is appeared in the iterable:
Note: valid_indices is in rdd format so i have to convert it into a list so it will be iterable
is_index1 = (filter(index_md5,valid_indices.collect()) ? true:false)
Seems like Python doesn't like the "?" syntax though. Please advise, i'm learning Python and thank you!