Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/341.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python打印问题_Python - Fatal编程技术网

Python打印问题

Python打印问题,python,Python,出于某种原因,它告诉我: print "I will now count my slaves:" print "females", 50 + 80 \ 10 print "males", 10 \ 2 print "Is it true that 6 > 7?" print "What is 59 + 27?" \字符是行连续字符,而不是除法运算符。它通常用于告诉Python将行连接在一起: print "females", 50 + 80 \ 10

出于某种原因,它告诉我:

print "I will now count my slaves:"

print "females", 50 + 80 \ 10
print "males", 10 \ 2
print "Is it true that 6 > 7?"
print "What is 59 + 27?"
\字符是行连续字符,而不是除法运算符。它通常用于告诉Python将行连接在一起:

    print "females", 50 + 80 \ 10
                                ^
SyntaxError: unexpected character after line continuation character
使用/用于分区:

foo = "This is a long line that won't fit inside 80 characters " \
      "so the line continuation character is one way to extend " \
      "the logical line across multiple physical lines."
\字符是行连续字符,而不是除法运算符。它通常用于告诉Python将行连接在一起:

    print "females", 50 + 80 \ 10
                                ^
SyntaxError: unexpected character after line continuation character
使用/用于分区:

foo = "This is a long line that won't fit inside 80 characters " \
      "so the line continuation character is one way to extend " \
      "the logical line across multiple physical lines."