5. Lists [Python 3 Programming Tutorials]

preview_player
Показать описание
This python video answers about lists. It gives information about what is a list, how to create a list, range element, the use of list method and list function.

Topics that are covered in this Video:
0:00 Overview
0:58 create list variable
2:06 How list are stored in computer memory
4:01 How do you access a range of elements
5:01 use append() method
7:04 Join two list
8:24 list concatenation
9:00 len() function
9:27 "in" operator

🔖Hashtags🔖

#pythonlist #pythonliststutorial #listappend #listsinpython #listpython #removelist #addtolist #pythonlistmethods

Next Video:

Рекомендации по теме
Комментарии
Автор

Day 5 of 6 months Data science roadmap 2023 has been completed today. Great teaching skills and Exercises.

prashantjoshi
Автор

Thank you so much for all these videos. I think these are the most clear and concise programming videos on YouTube.

TeemoCity
Автор

brother I'm data science intern student your videos are very very very useful for me.i have give you 5 star rating on this videos ⭐⭐⭐⭐⭐. thank you brother❤🌹🙏.

vignesan
Автор

Very easy to follow explanations. Thank you very much!

aditidas
Автор

How do I print the last three items in reverse print(items[-1:-4])?

karanam
Автор

To remove any item from the list:
>>>items=['butter', 'bread', 'egg']
>>>del items[1] | del items[index]

>>>items
['butter', 'egg']

sarimmasood
Автор

for those who are starting, the TypeError: object does not support item assignment**** is will happen when you put items=("milk", "pasta", "fruits", "bread") but the solution is the square bracket[ ] so the answer us items=["milk", "pasta", "fruits", "bread"], I hope this help because I am now starting my journey in data science lol'

riccardoholder
Автор

This playlist is very helpful, thank you so much!!

just_a_viewer
Автор

Sir, Is the level of the given practice questions are enough for data science ?

rishabhsingh
Автор

items[0]='chips'
Traceback (most recent call last):
File "<pyshell#57>", line 1, in <module>
items[0]='chips'
TypeError: 'tuple' object does not support item assignment

Not taking replace item.

vinayrb
Автор

What if I want to access to two elements that are not positioned adjacently in the list, say 'bread' and 'fruits'?

shafayet
Автор

items
('biscits', 'oil', 'groceries')
>>> items.insert(1, 'fruits')
Traceback (most recent call last):
File "<pyshell#66>", line 1, in <module>
items.insert(1, 'fruits')
AttributeError: 'tuple' object has no attribute 'insert'

vinayrb
Автор

When I use this items.insert(1, "Butter") I get butter 2 times, Why ?
['bread', 'Butter', 'Butter', 'Pasta', 'fruits', 'veggies']

dinuherath
Автор

What if we want to remove -1 (The last thing from our list)
is it
items.remove(-1)?
I'm just able to replace it with other thing:(

harshbhojak
Автор

we have small list so we can be able to predict the index then what if we have a long list?

sravanthitoomkunta
Автор

This is excellent stuff. Thank you so much Sir!

MaiaUnfiltered
Автор

So I got curious!!. When you combine the items food and bathroom it works fine. But lets say if I use the insert function to add an item to the food list it does not get updated in the items list. Is there a separate command to update the list?

MrRawkz
Автор

items.append ("butter")
Traceback (most recent call last):
File "<pyshell#61>", line 1, in <module>
items.append ("butter")
AttributeError: 'tuple' object has no attribute 'append'

Error in adding Butter to list.

vinayrb
Автор

what if i want to find the index positon of one element of items? for example i don't know the index position of 'fruits' and i want the code to display it
thanks for videos

katienefoasoro
Автор

good sir I am non technical but I am understanding thank you for your videos

jennenaresh
visit shbcf.ru