On Thursday, June 16, 2016 at 8:34:46 PM UTC+12, Yubin Ruan wrote:
> print "A test case" + \
>"str_1[%s] " + \
>"str_2[%s] " % (str_1, str_2)
Try this:
print \
(
"A test case"
"str_1[%s] "
"str_2[%s] "
%
(str_1, str_2)
)
Python takes this n
"Yubin Ruan" wrote in message
news:930753e3-4c9c-45e9-9117-d340c033a...@googlegroups.com...
Hi, everyone, I have some problem understand the rule which the python
compiler use to parsing the multiline string.
Consider this snippet:
str_1 = "foo"
str_2 = "bar"
print "A test case" + \
Yubin Ruan writes:
> Hi, everyone, I have some problem understand the rule which the python
> compiler use to parsing the multiline string.
>
> Consider this snippet:
>
> str_1 = "foo"
> str_2 = "bar"
>
> print "A test case" + \
>"str_1[%s] " + \
>"str_2[%s] " % (str_1, str_2)
>
>
Yubin Ruan wrote:
> Hi, everyone, I have some problem understand the rule which the python
> compiler use to parsing the multiline string.
>
> Consider this snippet:
>
> str_1 = "foo"
> str_2 = "bar"
>
> print "A test case" + \
>"str_1[%s] " + \
>"str_2[%s] " % (str_1, str_2)
>
Hi, everyone, I have some problem understand the rule which the python compiler
use to parsing the multiline string.
Consider this snippet:
str_1 = "foo"
str_2 = "bar"
print "A test case" + \
"str_1[%s] " + \
"str_2[%s] " % (str_1, str_2)
Why would the snippet above give me an "T