import os

from PIL import Image

def mkthumb(fp, h=128, w=128):
    """docstring for mkthumb"""

    size = (h, w)
    f, ext = os.path.splitext(fp)

    im = Image.open(fp)
    im.thumbnail(size, Image.ANTIALIAS)
    im.save(f + ".thumbnail" + ext)

import os

from PIL import Image

def mkthumb(fp, h=128, w=128):
    """docstring for mkthumb"""

    size = (h, w)
    f, ext = os.path.splitext(fp)

    im = Image.open(fp)
    im.thumbnail(size, Image.ANTIALIAS)
    im.save('.thumbnail'.join([f, ext]))

Use better string concatenation in mkthumb()
Use better string concatenation in mkthumb()

  import os
  
  from PIL import Image
  
  def mkthumb(fp, h=128, w=128):
      """docstring for mkthumb"""
  
      size = (h, w)
      f, ext = os.path.splitext(fp)
  
      im = Image.open(fp)
      im.thumbnail(size, Image.ANTIALIAS)
-     im.save(f + ".thumbnail" + ext)
+     im.save('.thumbnail'.join([f, ext]))
  
Use better string concatenation in mkthumb()
## Code Before:
import os

from PIL import Image

def mkthumb(fp, h=128, w=128):
    """docstring for mkthumb"""

    size = (h, w)
    f, ext = os.path.splitext(fp)

    im = Image.open(fp)
    im.thumbnail(size, Image.ANTIALIAS)
    im.save(f + ".thumbnail" + ext)

## Instruction:
Use better string concatenation in mkthumb()
## Code After:
import os

from PIL import Image

def mkthumb(fp, h=128, w=128):
    """docstring for mkthumb"""

    size = (h, w)
    f, ext = os.path.splitext(fp)

    im = Image.open(fp)
    im.thumbnail(size, Image.ANTIALIAS)
    im.save('.thumbnail'.join([f, ext]))
