Python 3 Programming Tutorial – Multi-dimensional List

Home/Programming Video Tutorials/Python Video Tutorials/Python 3 Programming Tutorial – Multi-dimensional List

Python 3 Programming Tutorial – Multi-dimensional List

FavoriteLoadingAdd to favorites

In this Python 3 programming tutorial, we cover the multi-dimensional list. Up until now, we have focused on single dimensional lists, but this is limiting. In programming, we are able to create lists with infinite depth. Here’s how!

Sample code for this basics series: http://pythonprogramming.net/beginner-python-programming-tutorials/

Python 3 Programming tutorial Playlist: http://www.youtube.com/watch?v=oVp1vrfL_w4&feature=share&list=PLQVvvaa0QuDe8XSftW-RAxdo6OmaeL85M

http://seaofbtc.com
http://sentdex.com
http://hkinsley.com

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6

By | 2017-06-16T02:23:09+00:00 June 16th, 2017|Python Video Tutorials|36 Comments

36 Comments

  1. psych0fl3x June 16, 2017 at 2:26 am - Reply

    Can you make a video on how you can make a directory with in a directory. Thanks

  2. Timothy So June 16, 2017 at 2:28 am - Reply

    "otherwise i’m gonna cry"

  3. Brandon Volesky June 16, 2017 at 2:31 am - Reply

    Really helpful! Thanks!

  4. Luckster 247 June 16, 2017 at 2:33 am - Reply

    Dang you kinda look like Edward Snowden

  5. Nameer Hassani June 16, 2017 at 2:33 am - Reply

    Thank you, it helps me.

  6. Anusha Reddy June 16, 2017 at 2:33 am - Reply

    m=[1,23,[34,56,[67,78],[89,90]],[3,4]]
    can you please convert this multi dimensional list into one list

  7. Boumediene Shellcoder91 June 16, 2017 at 2:36 am - Reply

    clever man !!! thank you again, again and again  ^ ^

  8. Katie Flynn June 16, 2017 at 2:36 am - Reply

    I have been trying to understand python, but my teacher is not explaining it in a way that I understand at all. You, however, explain it so simply. Thank you! You saved me during exam time!

  9. Frank Smith June 16, 2017 at 2:40 am - Reply

    What a pointless tutorial. Why would you ever manually write a multidimensional list.

  10. free mind June 16, 2017 at 2:43 am - Reply

    how do i add a 2D, 3D and so on… list or array with an defined range. like in C++ (int list[10][10];)?

  11. Julio Lama June 16, 2017 at 2:43 am - Reply

    You are absolutely awesome man! thanks! <3 haha.

  12. AnnaLeo June 16, 2017 at 2:43 am - Reply

    I saw what you did there.

  13. Fatma Elsharkawy June 16, 2017 at 2:44 am - Reply

    I have a list of 700000 numbers. I need to randomly generate 10000 pairs of number from this list. how can I do that using python

  14. Rapsniperr Mick June 16, 2017 at 2:45 am - Reply

    Hey,

    I have got a 2d list lets say : [ [ "X" , "X" , "O" ] , ["O","X"] ]

    How can i count the amouts of X in the list?

  15. Wayne Askey June 16, 2017 at 2:52 am - Reply

    How do you split a list into lists?

  16. thedananti June 16, 2017 at 2:53 am - Reply

    don’t really understand why the result is 6.
    my method of thinking ->[1] chooses the first set of lists out of the 3
    [0] chooses the "0th" out of those two sub-lists, which would be 5,7
    and another [0] chooses 5.

    Where is the mistake in my thinking ?

  17. Prajesh Dey June 16, 2017 at 2:54 am - Reply

    Edward Snowden (?)
    Great Tutorial 🙂

  18. Jessica Sheng June 16, 2017 at 2:55 am - Reply

    That’s very helpful to understand. Thank you!

  19. Hieu Dao June 16, 2017 at 2:58 am - Reply

    thanks you so much sentdex , it very useful !!!

  20. Benjamin D. Halford June 16, 2017 at 2:58 am - Reply

    Good tutorial! One recommendation, rather than referring to list elements as "the zero’th" or the "oneth’ element, which I guess is perfectly correct, it’d perhaps be easier to state "the value at index 0". At least that way, you sound more like a computer! 🙂

  21. Orang e June 16, 2017 at 2:58 am - Reply

    try this: def func(*args):
    print(list(args))

    then you can manipulate args while it’s a list 🙂

  22. WALLSNAP June 16, 2017 at 3:01 am - Reply

    "you can go as deep as you want" THATS WAT SHE SAID

  23. George Parekkadavil June 16, 2017 at 3:03 am - Reply

    Hello..may I have your email address so that i can ask you questions if in doubt. This would be really appreciated

  24. Thisisminecraft98 June 16, 2017 at 3:04 am - Reply

    ‘As deep as you want’ Thats what she said.

  25. RRE Designs June 16, 2017 at 3:05 am - Reply

    Can I declare lists as variables and then make the bigger list comprised of those previously declared lists? like big_list = [list_1, list_2, list_3] I will actually test this in a while, but I think it would be interesting to leave it in the comments section. 😀

  26. VSVAI June 16, 2017 at 3:07 am - Reply

    sir i am getting problems in makin matrix programs what should i do

  27. Daniel Gomez June 16, 2017 at 3:08 am - Reply

    youre better that my teacher sometimes, you know who to explain this

  28. Bryan Liang June 16, 2017 at 3:09 am - Reply

    Is there any way to name the rows in a 2D array? Like instead of using the normal indices, I use like 2, 4, 6, 8?

  29. Hitesh Vaidya June 16, 2017 at 3:10 am - Reply

    how to accept a 2d array of nxn order from user?

  30. e June 16, 2017 at 3:12 am - Reply

    what if we’re trying to create a program that asks the user how many students, all names of that many students entered, and 3 scores for each student, and prints the name with 3 scores under it for however many times the number of students the user entered, using 2 dimensional? tad bit confused i havent really figured this out

  31. sonic2kk June 16, 2017 at 3:13 am - Reply

    As Python programmers, should we not be trying to comply with PEP8 for our standards? PEP8 recommends a similar style to what you used in the video. Personally, I was comfortable without PEP8 syntax before discovering it or looking into it a lot, but now, I need to make ALL THE CODE PEP8 complaint XD I know some Python programmers don’t like PEP8 (and I know some people, but not a lot mind you, that refuse to even use Python because of how it suggests PEP8 and how disgusted they are at the Zen of Python), but I really like it.

    I didn’t know Python _had_ multidimensional lists until now. Great video! Thanks for sharing!

  32. sara shaikh June 16, 2017 at 3:13 am - Reply

    this video’s are very useful to me

  33. mohammad amini June 16, 2017 at 3:15 am - Reply

    thanks ur awesome !

  34. chihabgoku June 16, 2017 at 3:16 am - Reply

    hi, can you please make a tutorial on how to create a 2D array using for loops and two inputs defining the 2 dimension?
    thank you

  35. Vik Nickname June 16, 2017 at 3:18 am - Reply

    Cool helped me ! But it should look like below. Your third line [7,2],[2,5] is in the second dimension. And print [2][0][0] would give an error. I tried it 😉
     x =[
    [[5,7],[6,6]],
    [[6,6],[7,8]],
    [7,2],
    [2,5],
    ]

  36. Andrew Katson June 16, 2017 at 3:21 am - Reply

    I could not conceptualize this at all! Thank you so much

Leave A Comment

*