以下程序的输出结果是:( )fo = open("text.txt",'w+')x,y ='this is a test','hello'fo.write('{}+{}\n'.format(x,y))print(fo.read())fo.close()
A: this is a test hello
B: this is a test
C: this is a test,hello.
D: this is a test+hello
A: this is a test hello
B: this is a test
C: this is a test,hello.
D: this is a test+hello
举一反三
- 以下程序的输出结果是: fo = open(“texttxt”,‘w+’) x,y =‘this is a test’,‘hello’ fo.write(’{}+{} ’format(x,y)) print(fo.read()) fo.close()
- 以下操作能实现追加写入文件的是 A: echo "hello" > /tmp/test B: echo "hello" >> /tmp/test C: print "hello\n" >> /tmp/test D: printf "hello\n" >> /tmp/test
- 以下哪个JSON格式是正确的: A: {"test":"hello"} B: ["test":"hello"] C: {"test":"hello":"world"} D: {"test"}
- 以下操作能实现追加写入文件的是 A: echo "hello" > /tmp/test B: echo "hello" >> /tmp/test C: print "hello " >> /tmp/test D: printf "hello " >> /tmp/test
- python中,下列不可以作为变量命名的是 A: Fo B: fo C: hello D: HELLO