I have a string variable L
and I need to print the 18th symbol, then the 36th, and so on in 18-character steps. They must be printed in the opposite case from the original letter (print A
if the original letter is a
, print a
if A
, etc.), along with the position of that letter in the string:
o 18,
o 36E
o 54
o 72I
I know how to get the 18th symbol in the string, but how do I process each 18th symbol? Can I do this using L[::18]
? And I don't really know how to transform from a
to A
.