need faster io for python programming !!

fasterio
python
tle

#1

The problems which I solved in c and Java are getting TLE in Python. I saw many submissions in python with very less time, in current contest.

May be, I am using slower io ?? Please guide me about faster io in Python.

I am new in python see this thread … http://discuss.ww2.codechef.com/questions/8773/which-scripting-language-should-i-learn

Hoping to get some help.


#2

Have a look at some tips

Also regarding input

import sys
n, m = map(int, sys.stdin.readline().split(' '))

is faster than

n, m = map(int, raw_input().split(' '))

#3

did’nt worked still getting TLE.


#4

The simplest and most powerful way to get your java program started is by using jigy Generator link text


#5

@bugkiller, can you please tell me among these, which one is faster?

import sys
n, m = map(int, sys.stdin.readline().split(’ '))

or

n,m = [int(i) for i in raw_input.split()]