Return just the item of a list if len(list) == 1

Solution 1:

If your list only has one item, it's usually at the 0th index. Just return result[0]. I would not recommend it though, since you will have to differentiate between lists and tuples from wherever you're calling that function.