Python Check If Last Element In List