Perl Switch Example Python Code