首页 > 试题广场 >

将字符串 "example" 中的字母 a 替换为字母 b,

[单选题]

将字符串 "example" 中的字母 a 替换为字母 b,以下代码正确的是?

  • example.swap('b', 'a')
  • example.replace('a','b')
  • example.match('b','a')
  • example.replace('b','a')
是把a替换为b,就是用b替换a,所以是B
发表于 2021-06-30 11:42:40 回复(0)
把a替换为b
发表于 2021-04-27 10:53:26 回复(0)
这题有问题吧,正确是B呀
发表于 2023-03-30 23:04:00 回复(0)
replace a with b的顺序
发表于 2022-06-16 09:37:24 回复(0)