Interview Query

New Resumes

Start Timer

0:00:00

Upvote
26
Downvote
Save question
Mark as completed
View comments (44)
Next question

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)]
.
.
.
.
.


Comments

Loading comments