>> I have a large list of strings that I am unpacking
>> and splitting, and I want each one to be on a new line.
>>
>> An example:
>>
>> recs =
>> 'asdfasdfasdfasdfasdf','asdfasdfasdfasdfasdf','asdfasdfasdfasdfasdf'
>> [(rec.split('f')) for rec in recs]
>>
>> output:
>>
>> [['asd', 'asd', 'asd', 'a
On Jun 4, 8:37 pm, Johnny Chang wrote:
> I have a large list of strings that I am unpacking
> and splitting, and I want each one to be on a new line.
>
> An example:
>
> recs =
> 'asdfasdfasdfasdfasdf','asdfasdfasdfasdfasdf','asdfasdfasdfasdfasdf'
> [(rec.split('f')) for rec in recs]
>
> output:
>
On Thu, Jun 4, 2009 at 5:37 PM, Johnny Chang wrote:
> I have a large list of strings that I am unpacking and splitting, and
> I want each one to be on a new line. Someone showed me how to do it
> and I got it working, except it is not printing each on its own
> separate line as his did, making i
On 2008-09-01, Luka Djigas <[EMAIL PROTECTED]> wrote:
> please, I need your help. I'm new to python, so I don't know if this
> will seem like a stupid question to some of you ...
There are several ways to do it. Have a look at the documentation
of modules time and datetime. For this exact problem
Luka Djigas wrote:
please, I need your help. I'm new to python, so I don't know if this
will seem like a stupid question to some of you ...
I have a need to write to a file (or just print on screen, that part
doesn't matter at this point) a list of dates, starting today. For
example:
>
02.09.2
Xah Lee <[EMAIL PROTECTED]> wrote:
> " It's very wasteful of space. In most texts, the majority of the
>code points are less than 127, or less than 255, so a lot of space is
>occupied by zero bytes. "
>
>Not true. In Asia, most chars has unicode number above 255. Considered
>globally, *possibly*
J. Cliff Dyer wrote:
" ...UCS-2, for example, is a fixed width, 2-byte encoding that can
handle any unicode code point up to 0x, but cannot handle the 3
and 4 byte extension sets. "
I was going to reply to say that this is a good point. But on my way i
looked up wikipedia,
http://en.wikipedia
On Mon, 10 Sep 2007 19:26:20 -0700, Xah Lee wrote:
> ・ Many Internet standards are defined in terms of textual data, and
> can't handle content with embedded zero bytes.
>
> Not sure what he mean by "can't handle content with embedded zero
> bytes". Overall i think this sentence is silly, and h
Xah Lee wrote:
> This post is about some notes and corrections to a online article
> regarding unicod and python.
>
> --
>
> by happenstance i was reading:
>
> Unicode HOWTO
> http://www.amk.ca/python/howto/unicode
>
> Here's some problems i see:
>
> ・ No conspicuous authorship. (howeve
This post is about some notes and corrections to a online article
regarding unicod and python.
--
by happenstance i was reading:
Unicode HOWTO
http://www.amk.ca/python/howto/unicode
Here's some problems i see:
・ No conspicuous authorship. (however, oddly, it has a conspicuous
ackno
Google groups seems to be stripping my quotation markslately.
Here's a retry to post my previous message.
--
Xah Lee wrote:
If i have a nested list, where the atoms are unicode strings, e.g.
# -*- coding: utf-8 -*-
ttt=[[u"→
On Sep 10, 8:12 am, Carsten Haese <[EMAIL PROTECTED]> wrote:
Xah Lee wrote:
If i have a nested list, where the atoms are unicode strings, e.g.
# -*- coding: utf-8 -*-
ttt=[[u"→",u"↑"], [u"αβγ"],...]
print ttt
how can i print it without getting the u'\u1234' notation?
i.e. i want it print just l
On Mon, 2007-09-10 at 06:59 -0700, Xah Lee wrote:
> If i have a nested list, where the atoms are unicode strings, e.g.
>
> # -*- coding: utf-8 -*-
> ttt=[[u"→",u"↑"], [u"αβγ"],...]
> print ttt
>
> how can i print it without getting the u'\u1234' notation?
> i.e. i want it print just like this: [[
On May 25, 3:55 pm, William Chang <[EMAIL PROTECTED]> wrote:
> Is the different behavior between __repr__ and __str__ intentional
> when it comes to printing lists? Basically I want to print out a list
> with elements of my own class, but when I overwrite __str__, __str__
> doesn't get called but i
oh okay. thanks.
--
http://mail.python.org/mailman/listinfo/python-list
William Chang wrote:
> Is the different behavior between __repr__ and __str__ intentional
> when it comes to printing lists? Basically I want to print out a list
> with elements of my own class, but when I overwrite __str__, __str__
> doesn't get called but if I overwrite __repr__, __repr__ will ge
On Sun, 07 May 2006 18:16:22 -0400,
Mel Wilson <[EMAIL PROTECTED]> wrote:
> Tim Chase wrote:
>> compboy wrote:
>>
>>> How do you print elements of the list in one line?
>>>
>>> alist = [1, 2, 5, 10, 15]
>>>
>>> so it will be like this:
>>> 1, 2, 5, 10, 15
>>
>>
>> >>> print ', '.join(alist)
>
Tim Chase wrote:
> compboy wrote:
>
>> How do you print elements of the list in one line?
>>
>> alist = [1, 2, 5, 10, 15]
>>
>> so it will be like this:
>> 1, 2, 5, 10, 15
>
>
> >>> print ', '.join(alist)
> 1, 2, 5, 10, 15
???
Python 2.4.2 (#1, Jan 23 2006, 21:24:54)
[GCC 3.3.4] on linux2
Typ
On 7 May 2006 09:15:10 -0700, compboy <[EMAIL PROTECTED]> wrote:
> How do you print elements of the list in one line?
>
> alist = [1, 2, 5, 10, 15]
>
> so it will be like this:
> 1, 2, 5, 10, 15
>
> because if I use this code
>
> for i in alist:
> print i
>
> the result would be like this
>
> 1
compboy wrote:
> How do you print elements of the list in one line?
>
> alist = [1, 2, 5, 10, 15]
>
> so it will be like this:
> 1, 2, 5, 10, 15
>
> because if I use this code
>
> for i in alist:
> print i
>
> the result would be like this
>
> 1
> 2
> 5
> 10
> 15
>
> Thanks.
>
There ar
compboy wrote:
> How do you print elements of the list in one line?
>
> alist = [1, 2, 5, 10, 15]
>
> so it will be like this:
> 1, 2, 5, 10, 15
>>> print ', '.join(alist)
1, 2, 5, 10, 15
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
compboy wrote:
>How do you print elements of the list in one line?
>
>alist = [1, 2, 5, 10, 15]
>
>so it will be like this:
>1, 2, 5, 10, 15
>
>because if I use this code
>
>for i in alist:
>print i
>
>the result would be like this
>
>1
>2
>5
>10
>15
>
>Thanks.
>
>
Well, first, if you just
22 matches
Mail list logo