python return list if not empty