title: How to pass an 'if' statement to a function?
body: <p>I want to pass an optional 'if' statement to a Python function to be executed.  For example, the function might copy some files from one folder to another, but the function could take an optional condition.</p>
  
  <p>So, for example, one call to the method could say "copy the files from source to dest <code>if source.endswith(".exe")</code></p>
  
  <p>The next call could be simply to copy the files from source to destination without condition.</p>
  
  <p>The next call could be to copy files from source to destination <em><code>if today is monday</code></em></p>
  
  <p>How do you pass these conditionals to a function in Python?</p>