Hello,
I need to use print function without generating a newline. It seems to me that using "," after print function does not works:
print ("ABC"),
print ("DEF")
The result:
ABC
DEF
with:
sys.stdout.write("ABC")
I have: ABC3
????
Any advice?
Thank you.
Angelo IK8VRQ
print() without newline
Re: print() without newline
It's all in the docs: https://docs.python.org/3/library/functions.html#print
https://docs.python.org/3/tutorial/inputoutput.html (search for ".write").
https://docs.python.org/3/tutorial/inputoutput.html (search for ".write").
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: print() without newline
Many thanks!!!
You are right!!!
Sorry.
Angelo IK8VRQ
You are right!!!
Sorry.
Angelo IK8VRQ
Last edited by ik8vrq on Sat Jan 17, 2015 6:37 pm, edited 1 time in total.
Re: print() without newline
Try using the end parameter:
For example: print(".",end="")
For example: print(".",end="")