Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Iam hungry
hw1
inverse matrix gauss jordan
Python mehrfachvererbung
newasd
PyNewInit
Greatest Common Factor (Euclidean algorithm, aka Euclid's algorithm)
python, attributes, setter and getter the pythonic way (V2)
test
Lab_I_4_25_11_2020
Please log in to post a comment.