In Python, list append adds an item to the end of the list. It adds the item completely as a single element. So, if you pass in a list to append, then the entire list is added as one element. The elements in the new list are not added one by one into the existing list. The list extend method extends a list by adding elements from an existing structure that can be looped through, on to the end of the list. This works exactly like you'd expect with lists, tuples, and sets, but there are some peculiarities that crop up when dealing with extend and dictionaries, as well as extend and string. Both of those peculiarities are covered in this video.
Sections
0:00 - append
1:23 - extend
3:06 - Outro
#python #codingtutorial #learntocode
На этой странице сайта вы можете посмотреть видео онлайн Python append and extend длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Jakubication 18 Июль 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 7 раз и оно понравилось 2 зрителям. Приятного просмотра!