title: Function to create LineString from Points using Shapely
body: <p>I have a list of points:</p>
  
  <pre><code>points = [Point(2.2, 4.2), Point(7.2, -25.1), Point(9.26, -2.456)]
  </code></pre>
  
  <p>I am trying to write a function that will  check that this list contains point objects and return then a LineString, so far:</p>
  
  <pre><code>def createLineGeom(giveLine):
  if type(giveLine) is shapely.geometry.point.Point:
      return LineString(giveLine)
  else:
      return 'pointList must contain shapely point object(s)'
  </code></pre>
  
  <p>I am only able to return the else message from createLineGeom(points). Not sure if my problem is with the type() function or my first return statement, I am very much a beginner writing functions.</p>
  
  <p>Thanks!</p>
  
  <p>Update after J_H answer</p>
  
  <pre><code>vertices = [Point(2.2, 4.2), Point(7.2, -25.1), Point(9.26, -2.456)]
  # function
  def createLineGeom(giveLine):
      if isinstance(giveLine, Point):
         return LineString(giveLine)
  </code></pre>
  
  <p>Still returns no value from</p>
  
  <pre><code>pls_work = createLineGeom(vertices)
  </code></pre>