Imagelib syntax
<p>this is my method:</p>

<pre><code>def genimg(points,name,mode):
          im = Image.new("1", (400,400))

          if mode=="xy":
              for l in points:
                  im.putpixel((int(l[1]),int(l[2]),1)

          im.save(name+=".png")
</code></pre>

<p>and I am getting a syntax-error at</p>

<pre><code>im.save(name+=".png")
 ^ 
</code></pre>

<p>Why am I getting it?</p>
