Python | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Python

Given a text string, return a new string where each character in the original string is duplicated. Implement the function replicateChar() to achieve the desired output. Input: The Input contains a text string. Output: The output is a text string. Sample Input 1 Hello A01640 t Sample Output 1 HHeelllloo Sample Input 2 123

11th Feb 2024, 7:35 AM
Roshan Kant
Roshan Kant - avatar
2 ответов
+ 2
What did you try so far? Link your attempt here and ask where do you have a problem?
11th Feb 2024, 7:50 AM
JaScript
JaScript - avatar
0
"".join(c*2 for c in input())
14th Feb 2024, 1:44 PM
Gabi_kun :3
Gabi_kun :3 - avatar