Back to Browse

Python Shell Session - Filtering Lists

11 views
Oct 18, 2024
3:04

A Python Shell Session on filtering lists. There are two original lists. One list contains numbers of 482, 107, 391, 172, 49, 234 and 510. The other list contains items of Potatoes, Pasta, Bacon, Leeks, Carrots, Peas and Fish. Filtering numbers greater than 200 gives the new list of 482, 391, 234 and 510. Filtering items beginning with P gives the new list of Potatoes, Pasta and Peas - here w[0] is used. Filtering items that are five characters in length gives the new list of Pasta, Bacon and Leeks.

Download

1 formats

Video Formats

360pmp43.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Python Shell Session - Filtering Lists | NatokHD