Write a function odd_increment_even_decrement_no_modify(items) that takes a list of
integers and returns a new list in which every odd number has been increased by 1
and every even number has been decreased by 1. The original list must not be changed.
Example
odd_increment_even_decrement_no_modify([1, 2, 3, 4]) -> [2, 1, 4, 3]
Implement this function:
def odd_increment_even_decrement_no_modify(items: list) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: items.
Input
[1, 2, 3, 4]
Output
[2, 1, 4, 3]