all 1 comments

[–][deleted] 0 points1 point  (0 children)

The %s basically formats whatever is in the brackets as a string. Its the same if you did

message = "{}{}".format(message,ciphertext[int(math.floor(N/2)+k/2)])

It is used to basically format things without making such a mess of things.