Interview Query

Marked Lists

Have you seen this question before?

You are given two lists of strings list1 and list2, which are sorted alphabetically in ascending order.

Implement a function that merges these two lists into one sorted list marking all items from list1 and list2 with characters "1""1" and "2""2" respectively at the end of each item and return that list.



list1 = ["ball","ninja","plan"]
list2 = ["cat","egg","zoo"]


def mark_lists(list1,list2) ->
Next question: Marketing Channel Metrics
Python 3.9.6
Loading editor
Use Shift + Enter to run code