https://365datascience.com/dwqa-answer/answer-for-why-does-my-print-get-erased/ -
Hi Maria,
Thanks for reaching out!
In Python the \ is an escape character, which can be used with other characters which have special meaning in Python. For instance,
\’ or \” produce inverted single or double commas. Here is a link to the Python’s documentation, where all the variations are listed.
https://docs.python.org/2.0/ref/strings.html
The issue is because of the \five\ and n\fish. \f is a page-breaking character, which is used in printing. It forces the printer to eject the current page and start printing at the top of a new one. In Spyder this is what’s causing a new line in your console.
If you type \\five\ and n\ fish(add a space between n\ and fish) instead you should be able to see your print.
Best,
Eli
#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy
No comments:
Post a Comment