How To Calculate Time Complexity In Python