If Array Is Not Empty Python Function