def shortForm(item):
    """Write out a shortened form of the provided item."""
    if item is None:
        return
    r=repr(item)
    if len(r) > sys.shortFormMaxSize:
        sys.stdout.write(r[:sys.shortFormSize]+' ... '+\
                         r[-sys.shortFormSize:]+'\n')
    else:
        sys.stdout.write(r+'\n')
Write out a shortened form of the provided item.
recipes/Python/364192_ShortForm/recipe-364192.py