again I would like to help, specifically how I could do it
in order for the script to work like this, I have this script (the function of the script is to select letters from words in order (for example, every second)
for the script below if I print(GetNthLetters("TSASS",2))
so the result is TAS
but I'm looking for the script so that the result is TAS and then continue and add the rest of the letters according to the same principle
so TAS and would continue from the beginning TAS + would add SS so the result would be TASSS
could someone help me with this? Thank you
here is mi script
def GetEveryLetters(text, n):
builtstring = ""
for index, letter in enumerate(text):
if index % n == 0:
builtstring = builtstring + letter
return builtstring
print(GetEveryLetters("TSASS",2))
here are a few examples of how I want it to outputs
print(GetEveryLetters("TSASS",2))
TASSS
print(GetNthLetters("TESTTHISIS",3))
TTISEHSITS
I would mainly need support there to select more letters than the number of letters, and I don't know how to do that anymore
ABS every 2 == ASB
thank you very much for your help, I tried to play with it for a long time but it didn't work I came here new to python :D