You can browse this part of the forum to find tons of samples which show input in python. Especially the thread "solution to TEST in python".
The "normal" python functions input(), raw_input() work.
If you need faster I/O (some problems show "huge i/o warnings") you can use the sys module and patterns like this:
[bbone=Python3,526]import sys
def main():
for line in sys.stdin.readlines()[1:]:
if line.strip():
num = int(line)
result = num * num - 1
sys.stdout.write('%d\n' % result)
if name == 'main':
main()[/bbone]
//enhanced code //