[PYTHON] How to read problem data with paiza

The writing method to read the input data of the problem of paiza was unpleasant, but there was a good writing method, so make a note of it.

input.txt


3
1 2 3
4 5 6 
7 8 9

main.py


n = int(raw_input()) 

for i in range(n):
	a,b,c = map(int, raw_input().split())
	
	f(a,b,c)

def f(a,b,c):
	pass

Recommended Posts

How to read problem data with paiza
How to read e-Stat subregion data
How to deal with imbalanced data
How to deal with imbalanced data
How to Data Augmentation with PyTorch
How to read PyPI
How to read JSON
How to create sample CSV data with hypothesis
How to read a CSV file with Python 2/3
[Python] How to read excel file with pandas
How to scrape horse racing data with BeautifulSoup
How to read an array with Python's ConfigParser
How to read time series data in PyTorch
How to use xgboost: Multi-class classification with iris data
How to scrape image data from flickr with python
Summary of how to read numerical data with python [CSV, NetCDF, Fortran binary]
How to convert horizontally held data to vertically held data with pandas
How to update with SQLAlchemy?
How to get more than 1000 data with SQLAlchemy + MySQLdb
How to extract non-missing value nan data with pandas
How to cast with Theano
[Python] How to deal with pandas read_html read error
How to Alter with SQLAlchemy?
How to RDP with Fedora31
How to handle data frames
How to Delete with SQLAlchemy?
How to extract non-missing value nan data with pandas
Read json data with python
How to enable Read / Write of net.Conn with context with golang
A story about how to deal with the CORS problem
[Introduction to Python] How to get data with the listdir function
How to cancel RT with tweepy
[Python] How to FFT mp3 data
Python: How to use async with
How to install python-pip with ubuntu20.04LTS
How to read the SNLI dataset
How to get started with Scrapy
How to get started with Python
How to deal with DistributionNotFound errors
How to get started with Django
How to use FTP with Python
How to calculate date with python
How to install mysql-connector with pip3
How to INNER JOIN with SQLAlchemy
How to install Anaconda with pyenv
How to collect machine learning data
How to authenticate with Django Part 2
How to authenticate with Django Part 3
[Stock price analysis] Learn pandas with Nikkei 225 (004: Change read data to Nikkei 225)
How to make a command to read the configuration file with pyramid
How to do arithmetic with Django template
[Blender] How to set shape_key with script
How to collect Twitter data without programming
How to get parent id with sqlalchemy
How to add a package with PyCharm
How to solve the bin packing problem
How to install DLIB with 2020 / CUDA enabled
How to use ManyToManyField with Django's Admin
How to use OpenVPN with Ubuntu 18.04.3 LTS
How to use Cmder with PyCharm (Windows)
Convert Excel data to JSON with python