Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def insert(L, n1, n2):
- # @param L: list. List of integers
- # @param n1, n2: int
- # return list
- list_new = []
- for i in range(len(L)):
- list_new.append(L[i])
- if L[i] == n1:
- list_new.append(n2)
- return list_new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement