Hello and thanks so much for your help!
I have played around quite a bit with SharpKeys, but no luck.
It would be just quite fine even if I could never use that key when typing. I can't see a situation where I really would need to type < or > characters very often, so if it's possible to have a way NVDA thinking that it's my modifier key, that's just fine.
I'm sorry, but I think I do not really understand what I need to do in the Python Console. I'm really not into programmin so I might just miss something obvious. The only thing that happens when I press the key after pasting in the lines is that < characters comes into the text field of the python Console.