postings = [
["Python", "SQL", "teamwork"],
["Java", "SQL", "communication"],
["Python", "cloud", "communication"],
["Python", "SQL", "security"],
["JavaScript", "communication", "teamwork"],
["Python", "communication", "cloud"],
]
counts = {}
for posting in postings:
for skill in posting:
counts[skill] = counts.get(skill, 0) + 1
ranked = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0].lower()))
for skill, n in ranked[:4]:
print(skill, n)
Counting skills in job postings. The six postings are invented for practice; real research would use many real postings. Output (one line each): communication 4 / Python 4 / SQL 3 / cloud 2