title: Check if all values of a list are less than a certain number, if not set it to that number
body: <p>I have a list in python and I want to make sure that all values in the list are greater than some value. If not then I want to set it to that value.</p>
  
  <p>eg: let us assume the list is</p>
  
  <pre><code>a = [1,2,3,4]
  </code></pre>
  
  <p>and the value to compare is 3. So I want the list to become</p>
  
  <pre><code>a = [3,3,3,4]
  </code></pre>
  
  <p>I can do this by iterating through all the elements in the list. Is there a better way to do that?</p>