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 that the backslash is
now escaped by another backslash.

>>> LeafJawPositions=r'-42.000000000001\29.800000000001'
>>> LeafJawPositions
'-42.000000000001\\29.800000000001'
>>> x1, x2 = LeafJawPositions.split('\\')
>>> x1, x2
('-42.000000000001', '29.800000000001')

See http://docs.python.org/ref/strings.html for more info.

Greets
Sander
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to