Could I do a starts_with comparison for a string with a list of strings, return True if the string starts with any of the strings in the list, this is what I come up with,
df = pl.DataFrame({'a': ['https://abcd.com', 'https://youtube.com'],
'validation_urls': [['https://abcd.com', 'https://efgh.com'],
['https://abcd.com', 'https://efgh.com']]})
df = df.with_columns(is_valid=pl.col('a').str.starts_with(pl.col('validation_urls').explode()))
┌─────────────────────┬──────────────────────────────────────────┬──────────┐
│ a ┆ validation_urls ┆ is_valid │
│ --- ┆ --- ┆ --- │
│ str ┆ list[str] ┆ bool │
╞═════════════════════╪══════════════════════════════════════════╪══════════╡
│ https://abcd.com ┆ ["https://abcd.com", "https://efgh.com"] ┆ true │
│ https://youtube.com ┆ ["https://abcd.com", "https://efgh.com"] ┆ false │
└─────────────────────┴──────────────────────────────────────────┴──────────┘
but not sure if this is the ideal way to do this check.