Alan Gauld wrote:
> "Dick Moores" <[EMAIL PROTECTED]> wrote
>
>> lstNums = []
>> for x in lstSvg:
>> num = int(x.split('.')[0])
>> lstNums.append(num)
>
> This is exactly what a list comp does so you could rewrite it as:
>
> lstNums = [int(x.split('.')[0]) for x in lstSv
At 08:19 AM 4/9/2007, Alan Gauld wrote:
>"Dick Moores" <[EMAIL PROTECTED]> wrote
>
> > lstNums = []
> > for x in lstSvg:
> > num = int(x.split('.')[0])
> > lstNums.append(num)
>
>This is exactly what a list comp does so you could rewrite it as:
>
>lstNums = [int(x.split('.')
"Dick Moores" <[EMAIL PROTECTED]> wrote
> lstNums = []
> for x in lstSvg:
> num = int(x.split('.')[0])
> lstNums.append(num)
This is exactly what a list comp does so you could rewrite it as:
lstNums = [int(x.split('.')[0]) for x in lstSvg]
One of the cases where I actua
At 03:39 AM 4/9/2007, Kent Johnson wrote:
>Dick Moores wrote:
>>Sorry if my Subject line isn't clear about what my question is.
>>I have a script that uses the turtle and random modules to create
>>SVG files, one after another, in a directory just for the SVGs. The
>>script assigns filenames in t
Dick Moores wrote:
> Sorry if my Subject line isn't clear about what my question is.
>
> I have a script that uses the turtle and random modules to create SVG
> files, one after another, in a directory just for the SVGs. The
> script assigns filenames in the form, "n.svg", where n is an integer.
Sorry if my Subject line isn't clear about what my question is.
I have a script that uses the turtle and random modules to create SVG
files, one after another, in a directory just for the SVGs. The
script assigns filenames in the form, "n.svg", where n is an integer.
E.g. 1.svg, 2.svg. 3.svg, .