@claudiodsf another idea here: You could use `elif` here, as all the conditions are exclusive. But an even more elegant way would be to use a dictionary loopup for these 22 lines:
```
#python
system = {'xx': ('tt', 1), 'yy': ('pp', 1), 'zz': ('rr', 1), 'xy': ('tp', -1)}
return system.get(code, (code, 1))
```

Jut tweaking a bit... :)