Check if there's an item inside a list and if True modify it
<pre><code>list1 = [1,2,3]
def ex(example_list):
     for number in example_list:
         if(number == 2):
              number = 3

ex(list1)
print(list1)
</code></pre>

<p>I need to check if there is the number 2 inside of the list1 and if it's inside of it, I want to modify it to 3.<br>
But if I run the command, <code>number</code> would be <code>3</code>, but <code>list1</code> would remain <code>[1,2,3]</code> and not <code>[1,3,3]</code></p>