I need to check a string over which I have no control for the first 2 non-white
space characters (which should be '[{').
The string would ideally be: '[{...' but could also be something like
' [ { '.
Best to use re and how? Something else?
--
https://mail.python.org/mailman/listinfo/pyt
Thanks much - both solutions work well for me
On Wednesday, December 30, 2015 at 2:57:50 PM UTC-8, Ben Finney wrote:
> kierkega...@gmail.com writes:
>
> > How do I get from here
> >
> > t = ('1024', '1280')
> >
> > to
> >
> > t = (1024, 1280)
>
> Both of those are assignment statements, so I
How do I get from here
t = ('1024', '1280')
to
t = (1024, 1280)
Thanks for all help!
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, March 24, 2015 at 8:29:24 PM UTC-7, Chris Angelico wrote:
> On Wed, Mar 25, 2015 at 2:13 PM, wrote:
> > I have a list containing 9600 integer elements - each integer is either 0
> > or 1.
> >
> > Starting at the front of the list, I need to combine 8 list elements into 1
> > by trea
I have a list containing 9600 integer elements - each integer is either 0 or 1.
Starting at the front of the list, I need to combine 8 list elements into 1 by
treating them as if they were bits of one byte with 1 and 0 denoting bit on/off
(the 8th element would be the rightmost bit of the first