Python Program to remove items from a sub list || Nested List

preview_player
Показать описание
Hi Guys, Welcome to my channel.

In this video you will learn about how to Python Program to remove items from a sub_list

Python Scripts
======================

Python Functions Solved
==========================

Python Programs Solved
============================

Code
=============================
"""Remove First Item
===================================="""
my_list = [[1, 4, 5, 6, 7], [1, 2, 3, 4, 5], [5, 6, 8, 1]]

for items in my_list:
del items[0]

print(my_list)

"""Remove Last Item
=================================== """
my_list = [[1, 4, 5, 6, 7], [1, 2, 3, 4, 5], [5, 6, 8, 1]]

for items in my_list:
del items[-1]

"""Remove 4
============================="""
my_list = [[1, 4, 5, 6, 7], [1, 2, 3, 4, 5], [5, 6, 8, 1]]

for items in my_list:
try:
except ValueError:
pass
else:
del items[my_index]

print(my_list)
Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners
Рекомендации по теме
Комментарии
Автор

Can criate a vídeo about it


Remove elements espercifique
Game
A game with 25 numbers
Sorted 15number between 25.
If you want to Sorted 50 (play game list)

Verifique for each list sorted if my_list in list remove it.
my_list = [1, 2 4, 7]
(verifique list with my_list and remove list about of my_list)

dejafet