Python Code Challenge 003 - Repeating String Characters

preview_player
Показать описание
Welcome to Python code challenges, Python challenge 003. In this Python code challenge series we hope to compliment the existing Python courses on this channel. In this Python code challenge for beginners we look at creating a function to repeat letters from a string passed into a function. Code challenges are for people looking to sharpen their Python skills first at a beginner's level with the ambition to then move into more advanced challenges as we progress.

✨Challenge:
Write a new function that passing in a new string. The function should return a string whereby each character of the original string has been repeated once.

Notes/Constraints:
None

00:00 Introduction

Code Repository:

🏅 Code Challenges - Python Beginner Playlist:

🏅 Python Beginners Course:
Code repository:

🏅 Python Beginners + Course :
Code repository:

🏅 Python Intermediate Course:
Code repository:

🐱‍🏍Would you like to SUPPORT US FURTHER so that we can make even more great content - Please consider joining our members community.

👍SUBSCRIBE to get more free tutorials, courses and code snippets!
Рекомендации по теме
Комментарии
Автор

Cheers! Just for fun and to provoke thinking outside the proverbial box, how about this solution:

def doublechars(x):
return x+x

"Each character of the original string has been repeated once"

:)

rcgmenezes
Автор

Loved it sir keep making such quality videos tq rather than code the way u give intution is what will help us improve problem solving skills
Once again tq so much

yashasbharadwaj
Автор

If suppose word "bigger" here g repeted one bye one then condition should be true and "even" in that word e also repeted but randomly not in pair like 'ee' so this condition should be false so how we can code on that?

kirtikumarpatil
Автор

Does anyone know how to get it to return a list? For example double("Hi") to ['HH', 'ii']

weloveducks