Python 2D collections are easy ⬜

  Рет қаралды 60,298

Bro Code

Bro Code

Күн бұрын

Пікірлер: 28
@BroCodez
@BroCodez 2 жыл бұрын
Here are a few different 2d collection combinations: # 2D list of lists num_pad = [[1, 2, 3], [4, 5, 6], [7, 8, 9], ["*", 0, "#"]] # 2D list of tuples num_pad = [(1, 2, 3), (4, 5, 6), (7, 8, 9), ("*", 0, "#")] # 2D list of sets num_pad = [{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {"*", 0, "#"}] # 2D tuple of lists num_pad = ([1, 2, 3], [4, 5, 6], [7, 8, 9], ["*", 0, "#"]) # 2D tuple of tuples num_pad = ((1, 2, 3), (4, 5, 6), (7, 8, 9), ("*", 0, "#")) # 2D tuple of sets num_pad = ({1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {"*", 0, "#"}) # 2D set of lists (NOT VALID) num_pad = {[1, 2, 3], [4, 5, 6], [7, 8, 9], ["*", 0, "#"]} # 2D set of tuples num_pad = {(1, 2, 3), (4, 5, 6), (7, 8, 9), ("*", 0, "#")} # 2D set of sets (NOT VALID) num_pad = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {"*", 0, "#"}} for row in num_pad: for num in row: print(num, end=" ") print()
@ozimantv
@ozimantv 2 ай бұрын
I have a question about this. Why does the print at the end determine the position of the lists. If it is not in line with the 2nd for this doesn't work and i simply don't understand and didn't realize you did this which made me waste like an hour. I know positioning in loops matter however, i don't get how this one works as based on my knowledge thus far loops only work when the one under it is spaced further not equal to one of the previous higher ones
@kladzen
@kladzen Жыл бұрын
just started 2 days ago trying to learn python.. really great tutorials! keep up the good work. I have some projects both work related and personal stuff where i wanna use python to do some automation work in the end and this is really helping me!
@paultvshow
@paultvshow Жыл бұрын
Hey, how have your Python skills progressed after 11 months of learning? I have just started my machine learning journey for about a month too.
@ayowoleojoade4758
@ayowoleojoade4758 4 ай бұрын
@@paultvshow hey bro how is your machine learning journey going so far. I just started mine last week. I am coming from web development background
@kszoknyik
@kszoknyik Жыл бұрын
thank you! i was struggling with this and you made it make sense :)
@gaga40
@gaga40 2 жыл бұрын
Watching your 12 hour java video right now, keep up the good work Bro
@nicolewynne4781
@nicolewynne4781 2 жыл бұрын
Please could you do PHP beginner full course? Your videos are like an oasis in the desert for people like us who have financial struggles. Thanks a million BRO!!!
@chickennuggies0242
@chickennuggies0242 Жыл бұрын
I love watching your videos. I learn so much so easily
@zaparilty1770
@zaparilty1770 Жыл бұрын
Hello there, I wanted to thank you first and donate some money instead of spending them on another course but youtube said I am not allowed to donate from my country of residence. Sadly. So, I just want to thank you for your videos and the way you teach. I've done a dozen of courses including CS50, Udemy courses and so on. But none of them were as helpful as your approach with 'teach a lesson' -> 'complete a mini - project'. This's just amazing. To every project of yours that you taught I added something else and updated it in some ways to make it my own and yet I wonder, would those innumerous projects be of any help when it comes to landing a job? I have done like 20-25 of them but they are tiny, very diverse indeed but tiny, never exceed even a hundred of lines of code. Will they actually matter when the time comes? Just your opinion on their worth. Thanks.
@AmericanMaking
@AmericanMaking Жыл бұрын
Very helpful.
@harisshafi01
@harisshafi01 Жыл бұрын
dial_pad = [["1 2 3"], ["4 5 6"], ["7 8 9"], ["* 0 #"]] for dailer in dial_pad: for num in dailer: print(num, end=" ") print() OUTPUT : 1 2 3 4 5 6 7 8 9 * 0 #
@Ravi.Kumar-
@Ravi.Kumar- 2 жыл бұрын
Thanks 😊. Pls tutorial on recursion stuff.
@Jack_Victal
@Jack_Victal Жыл бұрын
Thank you very much!
@kpieceemmry3387
@kpieceemmry3387 11 ай бұрын
Still a little bit confuse how print() makes it lay let say end=“ “ create inform the item to be only separated by space not line then how come the peint() returns the food in rows
@Correa-pi2tx
@Correa-pi2tx Ай бұрын
How can I print a matrix next to the other?
@motomadman573
@motomadman573 6 ай бұрын
Could you make bingo using the num pad layout?
@MrKampay
@MrKampay Жыл бұрын
thank you bro!
@srilekhaa9203
@srilekhaa9203 16 күн бұрын
@brocode it would be helpful if u would add small videos libraries too concepts like numpy pandas seaborn matplotlib
@cee9962
@cee9962 6 ай бұрын
I was so disappointed that beef didn't make it to the meat list
@slppocommel3762
@slppocommel3762 2 жыл бұрын
thank you bro code you help a lot!!!!!
@derpfisti2457
@derpfisti2457 2 жыл бұрын
step 3 = done step 1 = done 👍 step 2 = done 🗯 watching your vids just a few days now, but i never learned so much in such a short time! Thanks Bro and keep on going!
@kristijanlazarev
@kristijanlazarev 10 ай бұрын
bomb
@captainhostile101
@captainhostile101 Жыл бұрын
lets hope i pass my test tomorrow ://
@AykhanChess13
@AykhanChess13 11 ай бұрын
Did you?
@captainhostile101
@captainhostile101 11 ай бұрын
@@AykhanChess13 yes sir i did, passed the course too. Thanks!
@reincarnationofthelightking
@reincarnationofthelightking 3 ай бұрын
@@captainhostile101 congratulations
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 332 М.
Create a QUIZ GAME with Python 💯
9:29
Bro Code
Рет қаралды 229 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
路飞做的坏事被拆穿了 #路飞#海贼王
00:41
路飞与唐舞桐
Рет қаралды 26 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 10 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 656 М.
Python *ARGS & **KWARGS are awesome! 📦
14:54
Bro Code
Рет қаралды 86 М.
Multidimensional Lists in Python
9:10
Fabio Musanni - Programming Channel
Рет қаралды 8 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 233 М.
String methods in Python are easy 〰️
12:06
Bro Code
Рет қаралды 124 М.
Generate random numbers in Python 🎲
8:03
Bro Code
Рет қаралды 73 М.
Python dictionaries are easy 📙
8:06
Bro Code
Рет қаралды 272 М.
Nested List in Python | Python Tutorials for Beginners #lec37
11:06
Jenny's Lectures CS IT
Рет қаралды 92 М.
Python lists vs. arrays: How similar are they?
11:45
Python and Pandas with Reuven Lerner
Рет қаралды 18 М.