Python Forum

Full Version: Problem with interactive python prompt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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?
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: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)
Thank you. It did.