RUVIDEO
Поделитесь видео 🙏

Lists in Python - List Comprehension , List Methods in Python Part 10 смотреть онлайн

📁 Обучение 👁️ 0 📅 02.12.2023

As we are following the Python series , This is going to be the part 10 , Where are going to Learn about Lists in Python
Lists in Python is defined as the collection of zero or more object references , And lists in Python are Mutable , There it means These lists can be modified , Changed , delete elements or add elements in to it
Lists can be created using three Methods :-
1.Using list()
in order to create a list using list() method , we can pass a set , tuple or even list to this function for example
t = (1,2,3)
x= tuple(t)
This is going to convert the tuple in to a list
we can also use range function to create a List , the example of that is shown in detail in the video , therefore watch the complete video


2. Using list literals
This is very simple as follows
marks = [90 , 92, 93]

remember one more thing that list allows duplicates within itself

3.unpacking operator
* but when it is called UNPACKING OPERATOR and when it is called MULT OPERATOR?
unary operator *x ---- UNPACKING
binary operator x*y --- MULT
it is used to unpack a list.
4. Using list comprehensions
Comprehensions are expressions with a LOOP and CONDITION(optional)
comp= [var_name for var_name in range(start,end)]
5.list methods
a) remove --This method takes one argument in to it where , In it you can specify an element it will remove that element from that list


i) sort -- This method is going to arrange the elements of the list in either Ascending order or descending order based on how you are going to use it,
if no arguments are provided to it , it is by default going to arrange them in the ascending order ,
if reverse= True is set then it is going to set them in the descending order
It also takes key argument which will be explained in detail in the functions video



 b) pop --- it takes an optional argument , if given it is considered as index of the list and it removes that particular element at that index postion , if no arguments are given it will remove the right most element of the list
c) clear -- it do not take any argument , it removes all the elements of list
d) copy -- create a copy of your existing list
e) index -- returns the index of the element provided as the argument
f) append -- adds an element to the right most part of the list
g) extend -- joins two lists,, a list and a tuple or list and set and so on
h) reverse -- changes the order of the list and reverses it














#Listsinpython #List #PythonCourse



Lists in Python - List Comprehension , List Methods in Python Part 10

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Lists in Python - List Comprehension , List Methods in Python Part 10» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.