Python Forum
Сheck if an element from a list is in another list that contains a namedtuple
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Сheck if an element from a list is in another list that contains a namedtuple
#2
Do you mean this?
for file in files:
    if file in requirements:
        print(f"{file} is in requirements")
Reply


Messages In This Thread
RE: Сheck if an element from a list is in another list that contains a namedtuple - by ibreeden - Oct-25-2022, 05:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange behavior list of list mmhmjanssen 3 388 May-09-2024, 11:32 AM
Last Post: mmhmjanssen
  element in list detection problem jacksfrustration 5 528 Apr-11-2024, 05:44 PM
Last Post: deanhystad
  list in dicitonary element problem jacksfrustration 3 793 Oct-14-2023, 03:37 PM
Last Post: deanhystad
  No matter what I do I get back "List indices must be integers or slices, not list" Radical 4 1,309 Sep-24-2023, 05:03 AM
Last Post: deanhystad
  Delete strings from a list to create a new only number list Dvdscot 8 1,655 May-01-2023, 09:06 PM
Last Post: deanhystad
  List all possibilities of a nested-list by flattened lists sparkt 1 970 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Find (each) element from a list in a file tester_V 3 1,286 Nov-15-2022, 08:40 PM
Last Post: tester_V
Question Keyword to build list from list of objects? pfdjhfuys 3 1,639 Aug-06-2022, 11:39 PM
Last Post: Pedroski55
  Membership test for an element in a list that is a dict value for a particular key? Mark17 2 1,271 Jul-01-2022, 10:52 PM
Last Post: Pedroski55
  How to find the second lowest element in the list? Anonymous 3 2,089 May-31-2022, 01:58 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020