I keep having to do this operation all over the place in my python code. I'm willing to bet there is an easier (aka one-line) way to do this.
results = getResults()
if len(results) > 0:
result = results[0]
I actually don't need "results" anywhere else, and I should only run "getResults" once.
Any ideas?