safely get first item array or list in python

myarr0] if myarr else None

Comments