Skills Both Candidates Share

Easy ⏱ 8 min 86% acceptance ★★★★☆ 4.4
Write shared_skills(a, b) that takes two lists of skill strings and returns a sorted list of the skills present in both, compared case-insensitively and returned in lowercase.

Examples

Example 1
Input
shared_skills(['Python', 'SQL', 'Excel'], ['sql', 'python', 'Tableau'])
Output
['python', 'sql']
Explanation

Python and SQL appear in both lists once lowercased.

Constraints

  • Comparison is case-insensitive.
  • Return a sorted list, not a set.

Topics

Setsintersection

Companies

LinkedInInfosysAccenture

Hints

Hint 1

Convert both lists to lowercase sets.

Hint 2

Use & for intersection, then sorted().

Loading the Python runtime… Run executes your code and shows printed output; Submit checks your function against this problem's examples.