This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
python3:output [2018/08/15 16:12] kericson [Advanced Output] - first pass at advanced output |
python3:output [2018/08/15 16:33] (current) jguerin Added byte count output to shell examples, removed and condensed associated descriptions. |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Output in Python3 ====== | ====== Output in Python3 ====== | ||
There is no magic bullet that leads to the fastest input and output in a programming contest. Having said this, there are typically multiple ways of performing and processing input and output in Python3. By understanding the options that are available and how to optimize them (e.g., conducting tests) you can see a real world performance increase, in particular when faced with high volumes of reads and writes. | There is no magic bullet that leads to the fastest input and output in a programming contest. Having said this, there are typically multiple ways of performing and processing input and output in Python3. By understanding the options that are available and how to optimize them (e.g., conducting tests) you can see a real world performance increase, in particular when faced with high volumes of reads and writes. | ||
+ | |||
+ | Unlike [[python3: | ||
+ | |||
+ | Otherwise, fine tuning of algorithm implementations and input or the selection of C++ may be better choices than fine tuning '' | ||
===== Output Basics ===== | ===== Output Basics ===== | ||
Line 27: | Line 31: | ||
===== Advanced Output ===== | ===== Advanced Output ===== | ||
- | |||
- | '' | ||
- | |||
- | '' | ||
<code python> | <code python> | ||
>>> | >>> | ||
- | >>> | + | >>> |
- | </ | + | |
- | <code python> | + | 1 |
- | >>> | + | |
- | >>> | + | |
</ | </ | ||
- | Concatenation is possible, but needs to be done with the '' | + | '' |
<code python> | <code python> | ||
>>> | >>> | ||
- | >>> | + | >>> |
- | </ | + | Hello World! |
- | + | 13 | |
- | Numbers can be written using '' | + | |
- | + | ||
- | <code python> | + | |
- | >>> | + | |
- | >>> | + | |
- | >>> | + | |
</ | </ | ||
+ | Unlike '' | ||
==== Benchmarks ==== | ==== Benchmarks ==== |