Python Forum
Create a new list by comparing values in a list and string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create a new list by comparing values in a list and string
#2
tips
1. any return true or false.
this is a true and false statement.
string in query_str
so if you remove if any.
it returns a generator of true and false
(string in query_str for string in predefined_lst)
2. write it out long hand. avoid the expression.
99 percent of computer problems exists between chair and keyboard.
Reply


Messages In This Thread
RE: Create a new list by comparing values in a list and string - by Windspar - Jan-14-2017, 02:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  question about changing the string value of a list element jacksfrustration 4 2,369 Feb-08-2025, 07:43 AM
Last Post: jacksfrustration
  Assigning cycle values in a list nmancini 3 1,151 Sep-16-2024, 09:35 PM
Last Post: deanhystad
  extract an element of a list into a string alexs 5 4,543 Aug-30-2024, 09:24 PM
Last Post: alexs
  comtypes: how to provinde a list of string to a COM method zalanthas 0 1,074 Jun-26-2024, 01:27 PM
Last Post: zalanthas
  remove duplicates from dicts with list values wardancer84 27 6,778 May-27-2024, 04:54 PM
Last Post: wardancer84
  Strange behavior list of list mmhmjanssen 3 1,784 May-09-2024, 11:32 AM
Last Post: mmhmjanssen
  Copying the order of another list with identical values gohanhango 7 2,895 Nov-29-2023, 09:17 PM
Last Post: Pedroski55
  Comparing Dataframe to String? RockBlok 2 1,877 Nov-24-2023, 04:55 PM
Last Post: RockBlok
  Sample random, unique string pairs from a list without repetitions walterwhite 1 2,122 Nov-19-2023, 10:07 PM
Last Post: deanhystad
  Search Excel File with a list of values huzzug 4 3,071 Nov-03-2023, 05:35 PM
Last Post: huzzug

Forum Jump:

User Panel Messages

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