title: How to ignore if a value is not present inside a list using python?
body: <p>I have an error w.r.t list inside a list. I am trying to assign the elements to a variable. So whatever I insert in those list inside the list it will get assigned to those variables. Like show below</p>
  <pre class="lang-py prettyprint-override"><code>list = [[1, 2], [2, 3], [4, 5]]
  car = list[0]
  bike = list[1]
  cycle = list[3]
  </code></pre>
  <p>Now, suppose I won't give a value for the 3rd list(like shown below). Then I will get an error:</p>
  <pre class="lang-py prettyprint-override"><code>list[[1, 2], [2, 3]]
  car = list[0]
  bike = list[1]
  cycle = list[3]
  </code></pre>
  <p>Error message: <code>List index out of range</code></p>
  <p>So, I wrote a condition which should ignore it. But I am getting a error. How to ignore if the values is not given?</p>
  <p>My code:</p>
  <pre class="lang-py prettyprint-override"><code>if list[0] == []:
      continue
  else:
      car = list[0]
  if list[1] == []:
      bike = list[1]
  if list[2] == []:
      cycle = list[2]
  </code></pre>
  <p>SyntaxError: <code>'continue' not properly in loop</code></p>
  <p>Where am I going wrong? How to give an if condition if there is no list in it? Did I give it correctly?</p>