Gunnar Hjalmarsson wrote:
>
>> @corenames=qw(
>> rb_basic_islamic
>> sq1_pentagonTile
>> sq_arc501Tile
>> sq_arc503Tile
>> );
>
>
> Impractical to mix code and data, isn't it?
Obviously not impractical, given he did it quite easily and succinctly.
> chomp( my @corenames = );
>
> __DATA__
On 27 Jun 2005 16:56:34 GMT, "F. Petitjean" <[EMAIL PROTECTED]> wrote:
>[En-tête "Followup-To:" positionné à comp.lang.python.]
>Le Mon, 27 Jun 2005 14:27:28 -, Grant Edwards a écrit :
>> On 2005-06-27, Xah Lee <[EMAIL PROTECTED]> wrote:
>>> i have a large number of lines i want to turn into a
[En-tête "Followup-To:" positionné à comp.lang.python.]
Le Mon, 27 Jun 2005 14:27:28 -, Grant Edwards a écrit :
> On 2005-06-27, Xah Lee <[EMAIL PROTECTED]> wrote:
>> i have a large number of lines i want to turn into a list.
>> In perl, i can do
>>
>> @corenames=qw(
>> rb_basic_islamic
>> sq1_
On 2005-06-27, Xah Lee <[EMAIL PROTECTED]> wrote:
> i have a large number of lines i want to turn into a list.
> In perl, i can do
>
> @corenames=qw(
> rb_basic_islamic
> sq1_pentagonTile
> sq_arc501Tile
> sq_arc503Tile
> );
>
> use Data::Dumper;
> print Dumper([EMAIL PROTECTED]);
>
> --
>
See definition of splitlines().
(http://docs.python.org/lib/string-methods.html)
-- Paul
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee (27.06.2005 12:33):
> i have a large number of lines i want to turn into a list.
> In perl, i can do
>
> @corenames=qw(
> rb_basic_islamic
> sq1_pentagonTile
> sq_arc501Tile
> sq_arc503Tile
> );
>
> use Data::Dumper;
> print Dumper([EMAIL PROTECTED]);
>
> --
> is there some short
Xah Lee wrote:
> i have a large number of lines i want to turn into a list.
> In perl, i can do
>
> @corenames=qw(
> rb_basic_islamic
> sq1_pentagonTile
> sq_arc501Tile
> sq_arc503Tile
> );
Impractical to mix code and data, isn't it?
chomp( my @corenames = );
__DATA__
rb_basic_islamic
sq1_pent
Xah Lee wrote:
> i have a large number of lines i want to turn into a list.
> In perl, i can do
>
> @corenames=qw(
> rb_basic_islamic
> sq1_pentagonTile
> sq_arc501Tile
> sq_arc503Tile
> );
>
> use Data::Dumper;
> print Dumper([EMAIL PROTECTED]);
>
> --
> is there some shortcut to turn l