Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to input 2-d array in python

matrix = [input().split() for i in range(no_of_rows)] # if only row is given and the number of coloumn has to be decide by user
matrix= [[input() for j in range(no_of_cols)] for i in range(no_of_rows)] # if both row and coloumn has been taken as input from user
Comment

PREVIOUS NEXT
Code Example
Python :: remove nans from array 
Python :: add background image in django uploaded file 
Python :: date to day python 
Python :: user nextcord interactions 
Python :: pandas inner join on two columns 
Python :: media django 
Python :: letter frequency counter python 
Python :: python get last key in dict 
Python :: decode html python 
Python :: telnet python 
Python :: python get name of file 
Python :: install qt designer python ubuntu 
Python :: python iterar diccionario 
Python :: extract text regex python 
Python :: python candlestick chart 
Python :: python filter list of dictionaries by value 
Python :: python create virtualenv 
Python :: selenium get back from iframe python 
Python :: how to separate a string or int with comma in python 
Python :: find the max value in dictionary python 
Python :: unnamed 0 pandas 
Python :: print () 
Python :: fibonacci sequence python 
Python :: beautifulsoup find_all by id 
Python :: dropping nan in pandas dataframe 
Python :: python gaussian elimination 
Python :: how many days until 2021 
Python :: How can I install XGBoost package in python on Windows 
Python :: python rsa 
Python :: change python version ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =