- #1
fog37
- 1,568
- 108
- TL;DR Summary
- print function in IDLE
Hello,
While using the IDLE editor, I noticed that it is possible to simply type the variable name, list name, dict name and view its content without using the print() function...For example, if the variable a=5, then I would expect print(a) to output 5. And it does. But I can also simply type "a" and obtain the same result...this makes the use of print superfluous...
What is going on? I though we would always need the print function to output something to the screen...
Thanks!
While using the IDLE editor, I noticed that it is possible to simply type the variable name, list name, dict name and view its content without using the print() function...For example, if the variable a=5, then I would expect print(a) to output 5. And it does. But I can also simply type "a" and obtain the same result...this makes the use of print superfluous...
What is going on? I though we would always need the print function to output something to the screen...
Thanks!