Replace values in list using Python,new_items = [(x if x % 2 else None) for x in items]