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.
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Open windows cmd prompt and run cmds with python | Extra | 3 | 3,552 |
Jul-14-2022, 06:07 AM Last Post: Gribouillis |
|
Facing Problem while opening a file through command prompt | vlearner | 4 | 3,209 |
Jan-30-2022, 08:10 AM Last Post: snippsat |
|
interactive map and function | hurc60248 | 1 | 2,488 |
Jan-08-2021, 09:22 PM Last Post: Larz60+ |
|
Running Python in Command Prompt | Anwar | 3 | 4,275 |
Nov-15-2020, 03:15 PM Last Post: snippsat |
|
starting python from windows command prompt | MaartenRo | 4 | 3,854 |
Sep-04-2020, 12:25 PM Last Post: MaartenRo |
|
for / else not working in interactive mode | Skaperen | 4 | 3,477 |
Jul-17-2019, 06:16 PM Last Post: Skaperen |
|
Python's id() function output in prompt and script mode | stormshadow | 4 | 5,061 |
Dec-10-2018, 10:08 AM Last Post: stormshadow |
|
How do I run python scripts from any directory using Windows command prompt? | bigmit37 | 4 | 17,631 |
Jun-15-2017, 04:13 PM Last Post: Larz60+ |
Users browsing this thread: 1 Guest(s)