Rethinking Nested for loops

In most of my coding practices, I always end up creating two for loops, i.e nested for loops, can you guys help how can I solve that ?

We’d need to see what you’re trying to do - can you give an example of where you think you’re doing it unnecessarily?