Open files in “rt” and “wt” modes

| | | | | | | | | | | |

Several times here on SO I"ve seen people using rt and wt modes for reading and writing files.

For example:

with open("input.txt", "rt") as input_file:
     with open("output.txt", "wt") as output_file: 
         ...

I don"t see the modes documented, but since open() doesn"t throw an error - looks like it"s pretty much legal to use.

What is it for and is there any difference between using wt vs w and rt vs r?