print
Examples
unpacking
code:python
numbers = 2, 1, 3, 4, 7'
print(*numbers, sep=", ")
code:output
2, 1, 3, 4, 7
Print to file
code:python
with open("hello.txt", mode="w") as file:
print("Hello world!", file=file,end='\n',flush=False)
Tips
The power of Python's print function - Python Morsels -
See also
IceCream Never use print() to debug again
pprint more human readable
pysnooper poorman's debugger