How to make a 2D list or matrix in Python and take a input from user

preview_player
Показать описание
#learntechtotech #rakeshroshan #2dlistinpython
How to create a 2D list in Python? How to create a matrix in Python?
**********************************************************************************************
Download Android app of Learn TechToTech from PlayStore by click on the below link:
**********************************************************************************************
How to take the user input in 2D list or matrix. How to make a 2D list or matrix in Python and take a input from user.
This channel gives you the video on Programming language, Technology, Latest Trends, Motivational Video and exam alert of MCA Entrances. Here you can easily understand the difficult topics easily in Hindi Langauge.
Thanks for Watching my Channel “Learn TechToTech”. Please subscribe my channel for getting first updates after uploading video.Social Media pages of Channel are:
_______________________________________________________________
Playlist of Different Technology:
1. Placement Series of C language:
2. Motivational Videos:
3. MCA Entrance Preparation:
4. Python Programming Language(In Hindi)
6. Android Mobile Application Development:
7. Placement and Interview Tips :
8. MCA Entrance Notification :
9. Operating System :
10. Python Programming Language :
11. C Language :
12. C language for Placement:
13. Java:
14. MySql :
15. Kotlin Programming Language :
16. Go Programming:
17. Internet of Things(IoT):
18. Oracle 11g :
19. C++ :
20. R Programming:
Рекомендации по теме
Комментарии
Автор

There is a small mistake : note
for i in range (0, m):
Mat.append([])

in respect of no. of rows we have to adjust '0'(Zeroes) to number of columns not rows.

AvinandanBose
Автор

Here's a smaller version of it:
r=int(input("Enter the number of rows"))
c=int(input("Enter the number of columns"))
mat=[ ]

for i in range(r):
mat.append([ ])
for j in range(c):
x=int(input("Enter the element"))
mat[i].append(x)

print(mat)

adarshgoswami
Автор

plz make video on stock market ohcl chart how will make ohcl chart if api is avalbel then

realnifty
Автор

mat = [[int(input()) for x in range (C)] for y in range(R)]

dineshnalli
Автор

Sir pls tell that CCNA certification Ka value hai yaa nahi

bbkbinay
Автор

1. Write a python code to initialize two 3x3 Matrices (A & B) using 2D list using nested loop and range() function and perform addition of Matrices. Make sure to store the result in 3rd 3x3 Matric (C).

xaddamhussain
Автор

at 05:18 in line:4, m changes into n

naturereflect
Автор

here's the answer in less no. of steps

m=int(input('enter rows:'))
n=int(input('enter columns:'))

mat=[[ int(input()) for x in range(n) ] for y in range(m)]

print(mat)

krishnanarwani
Автор

how I have to do for a matrix 5x2 or 4x3?

ffernando
Автор

Or in 1 line just do,
mat.append([[0] * n]*m)

dabbopabblo
Автор

Here's the easiest way to do this:

m=int(input('enter rows:'))
n=int(input('enter columns:'))

mat=[ int(input()) for x in range(n) ] for y in range(m)]

for j in mat:
print(j)

sal
Автор

Thank you. I was looking for this everywhere.!!!

jesusloaiza
Автор

Simple Solution
lst1=[[0, 0, 0], [0, 0, 0]]
for i in range(0, 2):
lst1[i][0] = int(input("Enter Number"))
lst1[i][1] = int(input("Enter Number"))
print(lst1)

MuneebR
Автор

how do i do this but instead of taking an input from user, i use random numbers to fill the 2d list

kayceekelvin
Автор

His voice is like Rakesh Mahanthi. To know who he is type worst interview ever.

BeyondthekrishYT
Автор

Not indian enough
4/10, 4 for sublime indian accent but -3 for missing loud keyboard clapping and - 3 for good mic quality

harbinger
Автор

it errors if u put 2 in row and 1 in column

carlknightcoph
Автор

How can I program to get for 3×3 matrix of this kind
1, 2
1, 2, 3, 4
1, 5

ambatipudimanjunath
Автор

Thank you, really useful and well explained!

keithlamizana
Автор

sir tell me about machine learning jobs carrier in india

abhinavsingh