Measures to counter TLE in Python

For the past few days whenever I solved some questions, I got TLE while submitting.
Sometimes the issue was resolved by some changes in logic.
But still, I am stuck on a few problems. I even tried it with PYPY3 as it’s suggested to be faster.
Can someone suggest some measures to optimize python code and bring down the time to execute