In Python 3 the ">>" symbol is no longer usable with the regular "print" for redirecting the output.
I had not before used it from inside the PDB, but, certainly, the support for it was removed at the same time.
What you have to do is to use the regular way of output to file with the new print function - or, if you want to do pretty print (pp does that), with the pprint.pprint function.
(Pdb) from pprint import pprint as ppr
(Pdb) file = open("x.txt", "wt")
(Pdb) ppr("mystuff", stream=file)
Or, for regular printing, the parameter name for the output file is file rather than stream (the advantage is that the import statement is not needed):
(Pdb) print ("mystuff", file=file)
Also, either these methods and the Python 2 >> way require the target to be an open file, not a string with the filename: