Python Forum
Problem with interactive python prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with interactive python prompt
#1
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.
Reply
#2
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

Reply
#3
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.
Reply
#4
(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

Reply
#5
Thank you. It did.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Interactive plots that can be embed in web page mouse9095 1 609 Jun-12-2023, 04:51 PM
Last Post: deanhystad
  Open windows cmd prompt and run cmds with python Extra 3 1,453 Jul-14-2022, 06:07 AM
Last Post: Gribouillis
  Facing Problem while opening a file through command prompt vlearner 4 1,920 Jan-30-2022, 08:10 AM
Last Post: snippsat
  interactive map and function hurc60248 1 1,767 Jan-08-2021, 09:22 PM
Last Post: Larz60+
  Running Python in Command Prompt Anwar 3 3,089 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,857 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Interactive Menu, String Search? maggotspawn 3 2,592 May-11-2020, 05:25 PM
Last Post: menator01
  for / else not working in interactive mode Skaperen 4 2,571 Jul-17-2019, 06:16 PM
Last Post: Skaperen
  Python's id() function output in prompt and script mode stormshadow 4 3,793 Dec-10-2018, 10:08 AM
Last Post: stormshadow
  tale interactive fiction - looking for tutorial aryell8linx 1 2,649 May-29-2018, 12:41 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020