Very basic Python question (strings, formats and escapes)

后端 未结 10 2074
别那么骄傲
别那么骄傲 2021-02-06 10:59

I am starting to learn Python with an online guide, and I just did an exercise that required me to write this script:

from sys import argv

script, filename = ar         


        
10条回答
  •  后悔当初
    2021-02-06 11:39

    I am just taking this course my self too for the first time and was wondering the same thing and this is what I figured out and got it to work with no issues. I am still learning this so if this is bad form let me know. Here is what I got to work for me.,

    target.write("%s \n%s \n%s" % (line1,line2,line3))
    

提交回复
热议问题