I have a problem in Python that I don't really understand what is required, please help me.
The problem is this:
A string is given. The string to be divided into fragments of three consecutive symbols. In each fragment the middle symbol is replaced by a random character that does not coincide with any of the characters in this fragment. The fragments should be sorted alphabetically.
All I did was just this code:
string = "Geeksforgeek"
n = 3
out = [(string[i:i+n]) for i in range(0, len(string), n)]
print(out)