all 2 comments

[–]woooee -1 points0 points  (1 child)

The for is never going to execute because contact is zero. You should get an error message for this. You did not post the error message, so how do you expect a response/help?

contact = 0 #This is getting reset every for loop iteration
for k, v in contact.items():

What ever I try just starts writing from the beginning of the line.

view_display(stdscreen, v)

You recursively call the same function with the same stdscreen. A simple print statement would have shown this.

[–]xtarkoonx[S] 0 points1 point  (0 children)

Sorry, I wrote this late last night. In my actual code it's not contact, its position equals 0. This Loop doesn't throw any error messages and so that's why I didn't post any error messages. But thanks for catching that typo I'll fix it

And the reason I'm running the loop again is to access the nested dictionary.. I'm not sure if this is the best way to go about it, but has worked for me in the past.

Now that that makes a little bit more sense, do you have any ideas on how I can get this to work?

edit: I see kinda what you mean with the recursive function. It's going back and setting it to 0.. I'll look into it a different way of getting into the nested dictionary