Sprawdź, czy ciąg jest równy ciągowi na liście Python

if any(x in paid[j] for x in d):
  # do stuff
Comfortable Caterpillar