title: How to iterate on elements of lists within a bigger list?
body: <p>Python beginner here, I've literally spent several hours of what I assume is a grade school problem to most - but I finally managed to get a solution together.</p>
  <p>The assignment was: Given a list of lists, such as L=[[1,2],[2,3,5]]
  I want to multiply by 5 all the odd numbers in L.</p>
  <p>Eventually I came up with this, which miraculously worked:</p>
  <pre><code>  def isOdd(n):
      if n%2 != 0:
          return True
      else:
          return False
  
      
  def mult(L):
      for i in L:
          for j in i:
              if isOdd(j):
                  oddInd = i.index(j)
                  i[oddInd] = j*5
      print(L)
  </code></pre>
  <p>I hardly ever ask for homework help, but I feel okay about this one since I've already done it; the reason I'm writing this here is to know if there's a better and quicker way to get around this (I'm sure it can be done in 2 lines).</p>
  <p>Also why wouldn't this work? (It was my first thought, and why I wasted so much time, before thinking about indices)</p>
  <pre><code>def mult(L):
    for i in L:
      for j in i:
        if isOdd(j):
          j = j*5
  </code></pre>
  <p>Thank you for your time everyone!</p>