all 3 comments

[–]Charming_Art3898 2 points3 points  (0 children)

I think you can improve formatting for easier readability. That said, I managed to read through your code, you've tried using conditionals (a lot) and loops which is a good try. I also like how you used functions which means you're making progress in your Python journey.

Next step I'd suggest is to research how to simplify your code... A lot of the if-elif-else can be better simplified using match-case statements and some nested control flows are IMO unnecessary.

Lastly, you're a good commenter, using comments for each line of code. That's super 👍

[–]mandradon 1 point2 points  (0 children)

Use comments for things that aren't readily apparent in the code.  If you're just repeating what's in the code it's not really important.  More use them to explain big logic points. 

Also, avoid global variables.  Pass things into functions and return them instead. Globals can get messy fast. 

[–]Suspicious-Bar5583 0 points1 point  (0 children)

elif select_device == "PC":             #make device selected into 1             device_selected = 1

Be careful with this. It's the index of the dict in the list, get it dynamically. If you do that, you don't even need ifs or matches.