Python syntaxerror: unexpected character after line continuation character

前端 未结 1 1553
有刺的猬
有刺的猬 2021-01-28 23:14

I\'m just starting python so am most likely just doing something stupid. I\'m reading data off of a table and need to put them into columns in a txt file. I cannot convince my c

相关标签:
1条回答
  • 2021-01-28 23:53
    table.write(\nflux + " " + observed)
    

    should be

    table.write("\n" + flux + " " + observed)
    

    or alternatively

    table.write("\n{} {}".format(flux, observed))
    

    More information about format() if you are curious.

    0 讨论(0)
提交回复
热议问题