What does this line of code mean?
ian.g.kelly at gmail.com
Sun Nov 16 22:53:04 CET 2014
On Sun, Nov 16, 2014 at 2:45 PM, Abdul Abdul <abdul.sw84 at gmail.com> wrote:
> I just came across the following line of code:
> outputfile = os.path.splitext(infile) + ".jpg"
> Can you kindly explain to me what those parts mean?
>>> import os.path
Help on function splitext in module ntpath:
Split the extension from a pathname.
Extension is everything from the last dot to the end, ignoring
leading dots. Returns "(root, ext)"; ext may be empty.
>>> os.path.splitext('test.txt') + ".jpg"
More information about the Python-list