A. To prevent infinite loops in Python, it's important to ensure that the loop condition can eventually become false. For example, we can use a counter to keep track of the number of iterations using a variable and include a condition in the loop that causes it to stop.