Does the if sentence on python execute only once?

Does the if sentence on python execute only once?

im new on this, and im using an if statement to load an image in case X thing happens, this is my code:

im new on this, and im using an if statement to load an image in case X thing happens, this is my code:

if  self.puntos > 0:
        self.fondo = load_image('Fondo2.png', IMG_DIR)
        self.primera_vez = True

So when puntos (points) get over 0 the background changes, the problem is that the new image loads constantly causing low framerates, is this because the if statement executes constantly or what? Thanks

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Python Development Companies | Hire Python Developers

After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...

Python GUI Programming Projects using Tkinter and Python 3

Python GUI Programming Projects using Tkinter and Python 3

Guide to Python Programming Language

Guide to Python Programming Language