On Mon, Dec 14, 2015 at 7:31 AM, Erik wrote:
> On 13/12/15 20:28, Erik wrote:
>>
>> When you call "print", then the list class's __repr__() method is called
>> which in turn calls the contained objects' __repr__() methods in turn
>
>
> I mean the __str__() method, not __repr__() in this case - how
On 12/13/2015 12:05 PM, KP wrote:
On Sunday, 13 December 2015 11:57:57 UTC-8, Laura Creighton wrote:
In a message of Sun, 13 Dec 2015 11:45:19 -0800, KP writes:
Hi all,
f = open("stairs.bin", "rb")
data = list(f.read(16))
print data
returns
['=', '\x04', '\x00', '\x05', '\
On 13/12/15 20:28, Erik wrote:
When you call "print", then the list class's __repr__() method is called
which in turn calls the contained objects' __repr__() methods in turn
I mean the __str__() method, not __repr__() in this case - however, the
answer is otherwise the same.
E.
--
https://m
On Sun, Dec 13, 2015 at 1:05 PM, KP wrote:
> On Sunday, 13 December 2015 11:57:57 UTC-8, Laura Creighton wrote:
>> In a message of Sun, 13 Dec 2015 11:45:19 -0800, KP writes:
>> >Hi all,
>> >
>> > f = open("stairs.bin", "rb")
>> > data = list(f.read(16))
>> > print data
>> >
>> >re
On 13/12/15 20:05, KP wrote:
On Sunday, 13 December 2015 11:57:57 UTC-8, Laura Creighton wrote:
In a message of Sun, 13 Dec 2015 11:45:19 -0800, KP writes:
Hi all,
f = open("stairs.bin", "rb") data = list(f.read(16)) print data
returns
['=', '\x04', '\x00', '\x05', '\x00', '\x01', '\x00', '
On Sunday, 13 December 2015 11:57:57 UTC-8, Laura Creighton wrote:
> In a message of Sun, 13 Dec 2015 11:45:19 -0800, KP writes:
> >Hi all,
> >
> > f = open("stairs.bin", "rb")
> > data = list(f.read(16))
> > print data
> >
> >returns
> >
> >['=', '\x04', '\x00', '\x05', '\x00', '\
On Sun, Dec 13, 2015 at 12:45 PM, wrote:
> Hi all,
>
> f = open("stairs.bin", "rb")
> data = list(f.read(16))
> print data
>
> returns
>
> ['=', '\x04', '\x00', '\x05', '\x00', '\x01', '\x00', '\x00', '\x00', '\x00',
> '\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
>
> The fir
In a message of Sun, 13 Dec 2015 11:45:19 -0800, high5stor...@gmail.com writes:
>Hi all,
>
> f = open("stairs.bin", "rb")
> data = list(f.read(16))
> print data
>
>returns
>
>['=', '\x04', '\x00', '\x05', '\x00', '\x01', '\x00', '\x00', '\x00', '\x00',
>'\x00', '\x00', '\x00', '\x0
Hi all,
f = open("stairs.bin", "rb")
data = list(f.read(16))
print data
returns
['=', '\x04', '\x00', '\x05', '\x00', '\x01', '\x00', '\x00', '\x00', '\x00',
'\x00', '\x00', '\x00', '\x00', '\x00', '\x00']
The first byte of the file is 0x3D according to my hex editor, so why
John,
Try the following code .. hope this helps and solves your problem . I have run
in the interactive mode
>>> s=''
>>> a=[s,'12']
>>> print a
['', '12']
regards
Srinivas
--
http://mail.python.org/mailman/listinfo/python-list
John Forse wrote:
I need to convert an input string say '' to a list of the form
['' ,]. If I use list(stringname), I get ['x','x','x','x'] ;
list.join() is an error; and str.join() won't use lists. I do need the
comma after the string. Is there a simple solution?
Have you tried [st
John Forse wrote:
> I need to convert an input string say '' to a list of the form
> ['' ,]. If I use list(stringname), I get ['x','x','x','x'] ;
> list.join() is an error; and str.join() won't use lists. I do need the
> comma after the string. Is there a simple solution?
Suppose your inp
I need to convert an input string say '' to a list of the form
['' ,]. If I use list(stringname), I get ['x','x','x','x'] ;
list.join() is an error; and str.join() won't use lists. I do need
the comma after the string. Is there a simple solution?
Regards
John
--
http://mail.pytho
En Thu, 20 Dec 2007 12:51:33 -0300, Peter Otten <[EMAIL PROTECTED]>
escribió:
> Mark T wrote:
>
>> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
>
>>> If you got that from a file, I bet you read it using the wrong
>>> encoding. Try opening the file using codecs.open("filename", "rb",
On Dec 21, 2:51 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Mark T wrote:
> > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
> >> If you got that from a file, I bet you read it using the wrong
> >> encoding. Try opening the file using codecs.open("filename", "rb",
> >> encoding="utf-16-b
Mark T wrote:
> "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
>> If you got that from a file, I bet you read it using the wrong
>> encoding. Try opening the file using codecs.open("filename", "rb",
>> encoding="utf-16-be") instead of plain open.
> There is an odd number of bytes in
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> En Thu, 20 Dec 2007 09:30:14 -0300, Neil Webster <[EMAIL PROTECTED]>
> escribi�:
>
>> I have a list which is a line from a file:
>> ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00',
>> '\x00
En Thu, 20 Dec 2007 09:30:14 -0300, Neil Webster <[EMAIL PROTECTED]>
escribi�:
> I have a list which is a line from a file:
> ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00',
> '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00']
>
> This should be in
> Hi All.
>
> I have a list which is a line from a file:
> ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009
> \x009\x00',
> '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\
> x002\x00']
>
> This should be in the format:
> ['381475.502599', '213622.174282']
>
> I've tr
On Dec 20, 12:30 pm, Neil Webster <[EMAIL PROTECTED]> wrote:
> Hi All.
>
> I have a list which is a line from a file:
> ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00',
> '\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00']
>
> This should be in the form
Hi All.
I have a list which is a line from a file:
['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00',
'\x002\x001\x003\x006\x002\x002\x00.\x001\x007\x004\x002\x008\x002\x00']
This should be in the format:
['381475.502599', '213622.174282']
I've tried a few options using re
yawgmoth7 wrote:
> Hello, I have a piece of code:
>
>command = raw_input("command> ")
>words = string.split(command, ' ')
>temparg = words
>if len(words)<= 3:
>temparg = words[4:]
>else:
>
Hello, I have a piece of code:
command = raw_input("command> ")
words = string.split(command, ' ')
temparg = words
if len(words)<= 3:
temparg = words[4:]
else:
tempar
23 matches
Mail list logo