当前位置:网站首页>String substitution
String substitution
2022-06-29 02:18:00 【Long street 395】
describe
When editing a document , For strings that appear frequently and are difficult to input, a special short string can often be used instead of input , Replace it when the document is completed . Such as : In the input “ Wuhan University of technology ” when , It can be used "whut" Instead of , Programming to complete this replacement .
Input format
There are three lines of input :
The first line is the short string used for substitution when entering
The second line is the long string to replace after the input
The third line is the input document , End with a carriage return .
Output format
Replaced string
Example :
Input :
whut
Wuhan University of technology
I love whut,whut It is a very beautiful school !
Output :
I love Wuhan University of Technology , Wuhan University of technology is a very beautiful school !
# Search and replace replace(), Be similar to Word Medium “ All replacement ” function .
str1 = input()
str2 = input()
s = input()
print(s.replace(str1, str2))边栏推荐
- 东方财富股票开户是会有什么风险吗?东方财富开户安全吗
- How to become a senior digital IC Design Engineer (6-7) digital IC Verification: debug skills
- Who do you want to know when opening a stock account? Is it safe to open an account online now?
- Which brokerage is safer and more convenient to open an account for compass mobile stock?
- 字符串分段组合
- [learning notes] subsets and questions
- Qt基础教程:数据类型与容器
- "The first share of endoscope" broke into IPO two times. Last year, it lost 500million yuan. The commercialization of core products is still in doubt | IPO Express
- Is it safe to contact the account manager online to open an account for stock speculation?
- Learning Tai Chi Maker - mqtt Chapter II (IX) test of this chapter
猜你喜欢

【Redis】SortedSet类型

2022.02.15
![[redis] set type](/img/97/0a83016e89316849c01072044f2124.png)
[redis] set type
Scala 基础 (三):运算符和流程控制

Oculusrifts and unity UI interaction (1) - Overview

【Redis】Set类型

Configurable FFT system design based on risc-v SOC (1) Introduction
Fundamentals of scala (3): operators and process control
Scala 基礎 (三):運算符和流程控制

Dialogue with opensea co creation Alex: we still only touch the tip of the iceberg of NFT capability | chain catcher
随机推荐
目标检测——ADAS实战
如何成为一名高级数字 IC 设计工程师(6-4)数字 IC 验证篇:测试点分解
如何成为一名高级数字 IC 设计工程师(3-5)工具篇:SpyGlass 技术
What is the Valentine's Day gift given by the operator to the product?
如何成为一名高级数字 IC 设计工程师(4-2)脚本篇:Verilog HDL 代码实现的文件读写操作
Why is it recommended that you choose the self research company as much as possible
Dialogue with opensea co creation Alex: we still only touch the tip of the iceberg of NFT capability | chain catcher
Examen final de troisième année
How to become a senior digital IC Design Engineer (4-3)
Utiliser kubernets Resource Lock pour compléter son application ha
MySQL details - aggregation and grouping
QT basics tutorial: data types and containers
Flex application: realize two rows and five columns of data, self-adaptive
To apply for a test engineer after years, the resume with high scores should be written like this
数字 IC 设计、FPGA 设计秋招笔试题目、答案、解析(2)2021 华为海思(上)
东方财富股票开户是会有什么风险吗?东方财富开户安全吗
字符串长度
QT basics tutorial: qstringlist
"The first share of endoscope" broke into IPO two times. Last year, it lost 500million yuan. The commercialization of core products is still in doubt | IPO Express
大三下期末考试