编写Python程序时,需要打开代码同目录下的“test.txt”文件,使用open函数只读方式打开,下列代码正确的是?( )
open('test.txt','r'')
open('text.txt','w')
open('test.txt','a')
open('text.txt','a+')