Postgresql Loop Through Array Python Example Class A Misdemeanor