On Wed, Apr 02, 2008 at 10:44:10AM -0400, Bryan Fodness wrote:
> I have a data pair separated by a backslash. I didn' t think it would see
> an end of line if the backslash was inside the quotes.
> Can this be done? I don't have a choice in what the separator is.
>
> >>> LeafJawPositions='-42.00
Bryan Fodness wrote:
> Thanks everyone,
> I was trying it this way.
>
> x1, x2 = LeafJawPositions.split(r'\\')
That is a string containing *two* backslashes.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Thanks everyone,
I was trying it this way.
x1, x2 = LeafJawPositions.split(r'\\')
On Wed, Apr 2, 2008 at 11:00 AM, Michael Connors <[EMAIL PROTECTED]>
wrote:
>
> >>> LeafJawPositions='-42.0001\29.8001'
> > >>> LeafJawPositions
> > '-42.0001\x029.8001'
> > >>>
On Wed, Apr 2, 2008 at 7:44 AM, Bryan Fodness <[EMAIL PROTECTED]> wrote:
> I have a data pair separated by a backslash. I didn' t think it would see
> an end of line if the backslash was inside the quotes.
The backlash is seen as an escape character.
Try the below, notice the string prefix r and
"Bryan Fodness" <[EMAIL PROTECTED]> wrote
> I have a data pair separated by a backslash.
> I didn' t think it would see an end of line if the backslash
> was inside the quotes.
Backslashes don't indicate end of line, they indicate a
continuation of a line. ie they tell Python to *ignore* the
On Wed, Apr 02, 2008 at 10:44:10AM -0400, Bryan Fodness wrote:
> I have a data pair separated by a backslash. I didn' t think it would see
> an end of line if the backslash was inside the quotes.
> Can this be done? I don't have a choice in what the separator is.
>
> >>> LeafJawPositions='-42.00
I have a data pair separated by a backslash. I didn' t think it would see
an end of line if the backslash was inside the quotes.
Can this be done? I don't have a choice in what the separator is.
>>> LeafJawPositions='-42.0001\29.8001'
>>> LeafJawPositions
'-42.0001\x029.8