TLE in python code

This is my code for the problem Maximize LCM.

When I press run it compiles and runs with no errors, giving correct output for the the example given with the question in 0.1 second. However when I submit my code it gives TLE error code.
Is there any faster method to calculate the LCM a list of integers?

Yes.
Use prime factorization using sieve