Re: why the output is different when i am implementig multiline string

2013-01-02 Thread stringsatif1
thanks cris -- http://mail.python.org/mailman/listinfo/python-list

Re: why the output is different when i am implementig multiline string

2013-01-02 Thread Dave Angel
On 01/02/2013 09:00 AM, stringsat...@gmail.com wrote: '''hello > world''' > 'hello\nworld' fred=''' hello > world''' print(fred) > hello > world What you're seeing has nothing to do with the triple quotes, and everything to do with how you're using the debugger. In one case, you j

Re: why the output is different when i am implementig multiline string

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 1:00 AM, wrote: '''hello > world''' > 'hello\nworld' fred=''' hello > world''' print(fred) > hello > world That's because repr() converts the newline into "\n", while print renders it literally. Check out repr() in the docs: http://docs.python.org/3/librar

why the output is different when i am implementig multiline string

2013-01-02 Thread stringsatif1
>>> '''hello world''' 'hello\nworld' >>> fred=''' hello world''' >>> print(fred) hello world -- http://mail.python.org/mailman/listinfo/python-list