Hi, I am new to Python and just learning. After defining a function and adding a """multi-line comment""", there is no >>> showing the beginning of next line to enter the code. Please help. Thank you.
Problem with interactive python prompt
Problem with interactive python prompt
|
Please, use meaningful titles.
It's not very clear what you are doing. >>> is interactive python prompt. That is python is in interactive mode and each command is executed immediately. If you try to enter multiline sting it will look like this. Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> """test ... tests ... """ 'test\ntests\n' >>>On other hand you can write you script in py file. I think that is what you are doing. In this case you don't need >>> at all. Actually if you have it you will get invalid syntax error. """ This is multiline string / docstring""" print('Hello world!')save this as py file and run it. check this tutorial https://python-forum.io/Thread-Basic-How...ython-code by the way what IDE you use?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
Aug-02-2018, 07:32 AM
Hey Thanks for the reply.Sorry new to python just starting out.So I am not much familiar with the terms. I am using IDLE as the IDE.
Aug-02-2018, 07:52 AM
(Aug-02-2018, 07:32 AM)Groot_04 Wrote: I am using IDLE as the IDE.I hope the link i shared helps. Look also https://python-forum.io/Thread-i-need-he...7#pid18867 for visual instructions (there is link to this also in the other thread)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
Aug-02-2018, 08:39 AM
Thank you. It did.
|
|
Users browsing this thread: 1 Guest(s)