PROBLEM SET
字符串替换
按知识点筛选题目,系统巩固该考点。
题目列表
共 15 题
A58794
下列程序的运行结果是?( )str1="cat dog cat dog cat dog"str2=str1.replace("cat","mouse",2)print(str2)
2022年
--
--
A58640
执行以下程序,输入"中国梦2022",输出结果是?w = input()
2022年
--
--
A58629
若s="人脸识别可以识别人脸信息",则执行s.replace("人脸","图像")语句后,s的值为"图像识别可以识别图像信息"。
2022年
--
--
A57658
以下哪个函数可以对字符串中的内容进行替换(注意:不是格式化输出)?
2023年-选择题
--
--
A62266
信息学奥赛练习题: 单词替换。【
2023年
--
--
A59079
已知输入变量x = 'hello world', 调用函数x.replace('l', 'h')的结果为?( )
2021年
--
--
A59627
s="abc123",采用字符串操作函数将其中的字符c替换为字符C,以下哪个操作正确?( )
2020年
--
--
A57987
执行Python代码print("李白".replace("白","杜"))后将输出"李杜"。
2023年-判断题
--
--
A68722
已知字符串s='? an you ?an a ?an as a ?anner ?an?an a ?an'为被破坏的英文绕口令,想要复原绕口令,就需要将字符串中的'?'替换为字母'c',能实现这个功能的代码是( )
2024年
--
--
A59894
运行下列Python程序,输出的结果是?( ) s = '抽刀断水水更流。' print(s.replace('水', '#'))
2024年-选择题
--
--
A59813
Python语句"I like program".replace("m","mming") 的运行结果?( )
2024年-选择题
--
--
A60204
某Python程序段如下,执行之后,输出内容为hello,java,java,python。( )s1="hello,python,python,python"
2024年-判断题
--
--
A66591
下列代码输出的是1 string s="1234@@chenadai";
2024年
--
--
A67662
下面程序最后能够得到HelloC++的是()1
2025年
--
--
A59704
执行下面Python代码后,输入“CCF2024”输出的结果是?( )w = input()
2024年-选择题
--
--