Skip to content
Advertisement

Tag: python-3.x

Python3 PyGame how to move an image?

I tried to use .blit but an issue occurs, here is a screenshot to explain my problem furthermore: The image appears to be smudged across the screen following my mouse code: Answer Fix the indentation in your given code, it puts all the important stuff outside the while loop. You can also add a function that redraws the window each

Finding index in nested list

I am trying to create a function that will take as input a nested list and an item, and return a list of indices. For example list = [0, 5, [6, 8, [7, 3, 6]], 9, 10] and item = 7 should return [2, 2, 0], since list[2][2][0] = 7 my code should work since I can print the desires

Advertisement