Adding Elements to a List in Python
Вставка
- Опубліковано 15 лип 2024
- Python Programming: Adding Elements to a List in Python
Topics discussed:
1. Adding Elements to a List in Python.
2. append() Method.
3. insert() Method.
4. extend() Method.
Python Programming Playlist: • Python Programming
Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
Contribute: www.nesoacademy.org/donate
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy.org/recommend...
Website ► www.nesoacademy.org/
Forum ► forum.nesoacademy.org/
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#PythonByNeso #PythonProgramming #ListsInPython
Concatenation is also same as extend () method
my_list = [[1, 2, 3], ['a', 'b''], 5, 6]
list2 = ['E', 'R']
my_list[1].extend(list2)
print(my_list)
OUTPUT:
[[1, 2, 3], ['a', 'b', 'E', 'R'], 5, 6]
Precise,clear and understandable
Great explanation 🙂
Excellence lecture sir
Wonderfully explained...you just earned a subscriber 🎉🎉🎉
Thank you
Osm explanation anna❤
Nice
print([1][1])
🐍 Python learning is a Fun here