Oct-22-2020, 07:57 AM
def tag(s): count = len(s) for i in range(count): res = f"{s[:1]}{''.join([char*2 for char in s[1:]])}" return res print(tag("Tom"))
Trying to write func("abcd") -> "abbcccdddd"
|
|
Messages In This Thread |
Trying to write func("abcd") -> "abbcccdddd" - by omm - Oct-22-2020, 07:27 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by Axel_Erfurt - Oct-22-2020, 07:57 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by omm - Oct-22-2020, 09:11 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by perfringo - Oct-22-2020, 08:43 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by omm - Oct-22-2020, 09:13 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by ebolisa - Oct-23-2020, 09:34 PM
RE: Trying to write func("abcd") -> "abbcccdddd" - by bowlofred - Oct-23-2020, 09:57 PM
RE: Trying to write func("abcd") -> "abbcccdddd" - by ebolisa - Oct-24-2020, 02:25 AM
RE: Trying to write func("abcd") -> "abbcccdddd" - by bowlofred - Oct-24-2020, 03:41 AM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
How to output one value per request of the CSV and print it in another func? | Student44 | 3 | 1,352 |
Nov-11-2022, 10:45 PM Last Post: snippsat |
|
Func Animation not displaying my live graph | jotalo | 0 | 1,571 |
Nov-13-2020, 10:56 PM Last Post: jotalo |
|
call func from dict | mcmxl22 | 3 | 2,874 |
Jun-21-2019, 05:20 AM Last Post: snippsat |
|
About [from FILE import FUNC] | Nwb | 7 | 3,628 |
Apr-21-2019, 02:46 PM Last Post: snippsat |
|
Executing func() from a different folder | ebolisa | 2 | 2,364 |
Jan-14-2019, 10:18 AM Last Post: ebolisa |
|
Correct number wrong position func. | albry | 5 | 6,043 |
Jan-11-2019, 04:01 PM Last Post: Larz60+ |
|
How can I return my list from a func? | Mike Ru | 3 | 3,109 |
Oct-22-2018, 01:15 PM Last Post: buran |
|
list func in lambda | mepyyeti | 1 | 2,921 |
Mar-10-2018, 09:07 PM Last Post: buran |
|
return variable in func | mepyyeti | 1 | 2,646 |
Mar-01-2018, 02:30 AM Last Post: Larz60+ |
|
Print func textbox instead of shell | zykbee | 1 | 5,261 |
Dec-06-2017, 08:22 PM Last Post: nilamo |