What result do you get for your 2.7-Code? really TLE?
I'm asking because of this.
So your code might not be able to run, unless it is assigned to a python 2.7 machine.
And I noticed that all my recent python submissions have been processed by python 2.5 servers.
I did not resolve this problem up to now - my only ACC code was run on a 2.7 machine and all re-submissions resulted in NZEC.