title: You can't use a list as a default argument, but can you use a tuple instead?
body: <p>Please let me know if there is a post already addressing it, I haven't been able to find a specific answer on this specific topic.</p>
  <p>You shouldn't use a list as a default value for a function argument because it is mutable. Which of the following codes is the best practice in this case?</p>
  <pre><code>def my_func(arg1 = (&quot;hello&quot;, &quot;world&quot;)):
      pass
  </code></pre>
  <p>or</p>
  <pre><code>def my_func(arg1 = None):
      if arg1 is None:
          arg1 = [&quot;hello&quot;, &quot;world&quot;]
  </code></pre>
  <p>I am talking about a situation in which a tuple and a list can be used the same way inside the function.</p>
  <p>Thanks!</p>