← Back to challenges

Are Letters in the Second String Present in the First?

PythonHardstringsvalidationregex

Instructions

Create a function that accepts a list of two strings and checks if the letters in the second string are present in the first string.

Examples

letter_check(["trances", "nectar"]) ➞ True

letter_check(["compadres", "DRAPES"]) ➞ True

letter_check(["parses", "parsecs"]) ➞ False

Notes

  • Function should not be case sensitive (as indicated in the second example).
  • Both strings are presented as a single argument in the form of a list.
  • Bonus: Solve this without RegEx.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Switcharoo