Function To Check If An Element In Int In Python