Using ‘range’ in python has you run through a range of (for example), numbers. You could compare information through a certain range, until you get to the answer you want. Therefore you must go through a range of numbers before you come up with your solution and subsequently check each one. If your answer doesn’t show up until one of the last numbers in the range is reviewed, it could take a while to find a solution.
‘Lists’ are another example. Sometimes lists (list=collection of information you could be querying, a list), can take a while to go through as some things go through your list in a linear fashion. Just like the range discussed above, it doesn’t come upon your solution for a while if your solution is at the end of the ‘List’.
There are many other aspects that affect efficiency in coding, but those are some of the main ones I understand right now. If what I discussed above makes sense to you, think about it when interacting with any program you use. Many times it can help to explain lagging in various programs. Inkscape especially has taught me that lag can also occur because you don’t understand the way the program works. That seems to be one of the fundamental reasons why open source programs are generally thought of to be lower quality. They are as high a quality as many of the programs to be bought on the market, however they just require that the user have more base knowledge of programming in order to use them effectively. Understanding some of the basics of programming can make the simplest things regarding computers make more sense. Keep that in mind next time you’re banging your head when working on something and you think it’s the computer’s fault. It could be the computers fault or it could be you!