Answer the question
In order to leave comments, you need to log in
How is the result of displaying a variable through the print() function different from accessing it directly?
Actually the whole question is described in the title
I do not understand the difference.
I see that in dictionaries with a long value, the output result is slightly different
Answer the question
In order to leave comments, you need to log in
Some development environments allow you to display the contents of a variable. For example, Jupyter or an interactive python interpreter. But this is not a python feature, it is a development environment feature. Simplifying, for each expression, the environment executes something like this:
result = введённое_тобой_выражение
if result is not None:
print(repr(result))
foo
bar
"foo\nbar"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question