Interview Query

New Resumes

Upvote
19
Downvote
Save
Mark Completed
Have you seen this question before?

Say we have a list of existing_ids that we have already scraped. Let’s say we also have two lists, one of names and another of urls that correspond to names with the id of the names in the url.

Write a function new_resumes to return the names and ids for ids that we haven’t scraped yet.

Example:

Input:

existing_ids = [15234, 20485, 34536, 95342, 94857]

names = ['Calvin', 'Jason', 'Cindy', 'Kevin']
urls = [
    'domain.com/resume/15234', 
    'domain.com/resume/23645', 
    'domain.com/resume/64337', 
    'domain.com/resume/34536',
]

Output:

def new_resumes(existing_ids,names,urls) ->
output = [('Jason', 23645), ('Cindy', 64337)]
Next question: Fraudulent Upvotes
.....
Loading editor
Use Shift + Enter to run

Comments

Loading comments