判断题
偏易
#6296
某Python程序段如下,执行之后,输出内容为hello,java,java,python。( ) s1 = "hello,python,python,pyth…
某Python程序段如下,执行之后,输出内容为hello,java,java,python。( )
答案与解析
正确答案:对
解析
x.replace( old,new[,max]),返回字符串中的old(旧字符串)替换成new(新字符串)后生成的新字符串,如果指定第三个参数max,那么替换则不超过max次。