Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
repeat string
"""Create a function that takes a string and returns a string in which each character is repeated once. Examples double_char("String") ➞ "SSttrriinngg" print("enter any char") wow[0]=input() print(wow[0]+wow[0]) """ txt="string" def double_char(txt): return txt[0]+txt[0]+txt[1]+txt[1]+txt[2]+txt[2]+txt[3]+txt[3]+txt[4]+txt[4]+txt[5]+txt[5] print(double_char(txt))
run
|
edit
|
history
|
help
0
max area rectangle
Short python input
Short python input
Reverse linked-list in-place
Lesson 9 hw
Generating subsets
1
Insertion sort
Repeated match within another regular expression
PyTypeSub