Python Programming Tutorial - 5 - Lists

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I know its 4 years late but I'm gonna say its the Penguins.

slicer
Автор

The 'append' function is not the same as adding a second list to an existing list. In the first case (i.e. while using 'append'), the complete list parameter is saving as an entire block element of the main list. Whereas in the second case, the individual elements of the entered list parameter are added along with the other existing elements of the primary list, making it easier to work with. Ex:- 'list1' is the primary list, whereas 'list2' is the one to be added...

>>> list1 = ["one", "two", "three"]
>>> list2 = ["four", "five", "six"]

CASE 1 (using 'append' function):-
>>> list1.append(list2)
["one", "two", "three", ["four", "five", "six"]]

CASE 2 (adding second list to first):-
>>> list1 += list2
["one", "two", "three", "four", "five", "six"]

vigneshas
Автор

Instead of append, you can use this:

players[len(players):] = [23]

To insert character at given position, use insert() method:

players.insert(0, 1)

^ This will insert number 1 before first item in the list.

radoznalipustolov
Автор

ur channel name is the new"BOSTON" but you support the Pittsburgh Penguins....interesting

rohanD
Автор

bucky, you literally saved hours of my time and probably a bunch of money too, thanks to your awesome tutorials. for that, thanks! ill continue the support by watching your videos and leaving likes

danielding
Автор

You can write players += [1, 2, 3] instead of using append

Iceman
Автор

this guys good. I've watched a lot of these tutorials trying to learn python and no one else ever says what the computer is thinking. As in "It's counting from left to right" etc. They just show you what happens but not why.

goadsaid
Автор

Pittsburgh penguins is your favorite team

TheAdminaaron
Автор

Bucky Roberts is the best online teacher ever!

tkrudi
Автор

Your favorite team is the Pittsburgh Penguins. Gotta add #81 to that list now though

thomas
Автор

Love your tutorials especially the new ones on python. YOU DA REAL MVP!!

Avraham.Eisenberg
Автор

bucky's tha manh😍....u gonna b most remembered person....u r manh of knowledege, ocean of brains....big fan manh big fan!

drtyharry
Автор

thenewboston has already taught me so much more than drapstv. #SICKBURN

dennisthemenace
Автор

Fleury, Letang, lemieux, malkin, crosby ;)

stephenchoi
Автор

I cant even tell you how amazing your videos are...

samnik
Автор

I studied comsci many years ago and I really hardly understood most it (prog languages)but these videos show you are way better than my teachers:D I really understand it better now.Thank you!

hazelcarter
Автор

When I saw those numbers 87, 71, first thing came up to my mind was ' Crosby and Malkin, it has to be Pittsburgh Penguins' Had to check rest of the numbers and I think i was right :D

rainerlaaksonen
Автор

To change permanently a list you could have used the '+=' operator

MicheleTurchiarelli
Автор

thank you for this amazing video lesson..Will you make a video about some function in lists like 'split', 'reverse'.etc.?

mehtappolat
Автор

I'm getting an inspiration high. Feels good. Simple satisfaction. Hope it lasts when this goes deep.

Aaron_Reaper
welcome to shbcf.ru