Timeline for what do the three dots in this line of Python code mean?
Current License: CC BY-SA 4.0
Post Revisions
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 1, 2024 at 5:00 | comment | added | philipxy | Please clarify via edits, not comments & delete & flag obsolete comments. Please avoid social & meta commentary in posts. Help center | |
| Jul 1, 2024 at 4:56 | history | edited | philipxy | CC BY-SA 4.0 |
removed meta & social content, improved language & format
|
| Jun 25, 2020 at 13:54 | answer | added | Harvard Candidate | timeline score: 1 | |
| Jun 25, 2020 at 7:42 | answer | added | Ashwin Radhakrishnan | timeline score: 0 | |
| Jun 25, 2020 at 7:34 | history | edited | Ashwin Radhakrishnan | CC BY-SA 4.0 |
deleted 12 characters in body
|
| Jun 25, 2020 at 7:28 | comment | added | Ashwin Radhakrishnan | sorry my bad. I'm new to stackoverflow as well so ended up using the ''' for the code. It's not there in the actual code | |
| Jun 25, 2020 at 7:25 | comment | added | deceze♦ |
Did it really work?! It's enclosed in ''', so it shouldn't be doing anything.
|
|
| Jun 25, 2020 at 7:23 | comment | added | Ashwin Radhakrishnan | Yes! thanks. I removed the >>> and it worked in a single line. but why did it run in the first case where >>> and ... was present in the code. I'm using jupyter notebooks to run this btw | |
| Jun 25, 2020 at 7:19 | comment | added | deceze♦ | Wherever you found this code was probably just trying to illustrate with a sample from the interactive Python interpreter. | |
| Jun 25, 2020 at 7:18 | comment | added | deceze♦ |
I think the syntax error is indicating the >>>?! Because that's not part of the code. The ... are irrelevant. The problem is that you're trying to execute code including the >>>.
|
|
| Jun 25, 2020 at 7:17 | comment | added | Shivam Bharadwaj | This probably indicates the indentation when you execute python from command prompt. Plz look into this docs.python.org/2.0/ref/indentation.html | |
| Jun 25, 2020 at 7:17 | review | First posts | |||
| Jun 25, 2020 at 7:23 | |||||
| Jun 25, 2020 at 7:17 | history | edited | deceze♦ | CC BY-SA 4.0 |
added 15 characters in body
|
| Jun 25, 2020 at 7:17 | comment | added | Ashwin Radhakrishnan | but why didn't the code work when I removed the dots and moved it to a single line | |
| Jun 25, 2020 at 7:16 | comment | added | deceze♦ |
It's not part of the code, just as the >>> isn't part of the code.
|
|
| Jun 25, 2020 at 7:15 | comment | added | Aditya | It's the continuation of a line indicator when using ipython etc; | |
| Jun 25, 2020 at 7:14 | history | asked | Ashwin Radhakrishnan | CC BY-SA 4.0 |