#!/usr/local/bin/python2 from os.path import splitext print splitext(a.g)