Timeline for How can I find the index for a given item in a list?
Current License: CC BY-SA 4.0
77 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 12 at 23:59 | comment | added | Reda ait | use .index() function | |
| Apr 8 at 19:27 | history | edited | Peter Mortensen | CC BY-SA 4.0 | Fixed the question formation - missing auxiliary (or helping) verb - see e.g. <https://www.youtube.com/watch?v=t4yWEt0OSpg&t=1m49s> (see also <https://www.youtube.com/watch?v=kS5NfSzXfrI> (QUASM)) - alternatively, drop the question mark. |
| Feb 26 at 9:23 | answer | added | amrita yadav | timeline score: 0 | |
| Dec 9, 2023 at 20:23 | history | edited | Rob Bednark | CC BY-SA 4.0 | improve title |
| Oct 26, 2023 at 18:14 | answer | added | Alejadro Xalabarder | timeline score: 1 | |
| Sep 22, 2023 at 11:35 | answer | added | Hadi Mir | timeline score: 1 | |
| May 14, 2023 at 2:45 | answer | added | ggorlen | timeline score: 3 | |
| Apr 18, 2023 at 17:30 | review | Suggested edits | |||
| Apr 19, 2023 at 16:25 | |||||
| Jan 7, 2023 at 22:44 | answer | added | Sanu | timeline score: 0 | |
| Dec 27, 2022 at 4:56 | review | Close votes | |||
| Dec 31, 2022 at 0:06 | |||||
| Dec 27, 2022 at 4:40 | comment | added | Karl Knechtel | There is no realistic chance of a better approach becoming possible in future versions of Python, because the existing approach is already just calling a single, built-in method on the list - as simple as it gets. | |
| Dec 27, 2022 at 4:39 | comment | added | Karl Knechtel | I’m voting to close this question (in protest) because there are already 42 undeleted answers (and 16 more deleted) for a simple, one-liner reference question that almost all have the same built-in function at their core (as they should, because it's the only reasonable and sane approach to the problem and everything surrounding it is just error-checking or creatively re-interpreting the specification, which still only leaves one other reasonable, sane approach to the expanded problem). | |
| Dec 14, 2022 at 14:36 | answer | added | saolof | timeline score: 0 | |
| Oct 2, 2022 at 9:35 | answer | added | My Car | timeline score: 4 | |
| May 5, 2022 at 4:01 | answer | added | Deepeshkumar | timeline score: 0 | |
| Apr 17, 2022 at 8:50 | answer | added | Babatunde Mustapha | timeline score: 37 | |
| Mar 28, 2022 at 12:01 | history | edited | Mateen Ulhaq | CC BY-SA 4.0 | Shorten. |
| Feb 7, 2022 at 10:46 | answer | added | Kofi | timeline score: 11 | |
| Jan 13, 2022 at 19:49 | answer | added | LunaticXXD10 | timeline score: 19 | |
| Jan 7, 2022 at 0:08 | answer | added | sargupta | timeline score: 3 | |
| Dec 29, 2021 at 18:49 | answer | added | Franz Gastring | timeline score: 1 | |
| Nov 28, 2021 at 12:37 | answer | added | user459872 | timeline score: 1 | |
| Oct 3, 2021 at 14:09 | answer | added | MD SHAYON | timeline score: 4 | |
| Jun 5, 2021 at 1:44 | review | Suggested edits | |||
| Jun 5, 2021 at 9:20 | |||||
| May 4, 2021 at 12:28 | answer | added | illuminato | timeline score: 0 | |
| Apr 10, 2021 at 7:48 | answer | added | Blackjack | timeline score: 9 | |
| Aug 28, 2020 at 9:35 | answer | added | Badri Paudel | timeline score: 12 | |
| Jun 22, 2020 at 16:02 | answer | added | Caveman | timeline score: 7 | |
| Apr 3, 2020 at 16:50 | answer | added | Vlad Bezden | timeline score: 5 | |
| Mar 5, 2020 at 20:29 | history | edited | Georgy | CC BY-SA 4.0 | main tag (Python in this case) is included in the title automatically, removed it |
| S Mar 5, 2020 at 19:59 | history | suggested | cobrexus | CC BY-SA 4.0 | clarified body, fixed format |
| Mar 5, 2020 at 19:28 | review | Suggested edits | |||
| S Mar 5, 2020 at 19:59 | |||||
| Feb 26, 2020 at 21:02 | history | edited | John Smith | CC BY-SA 4.0 | added 2 characters in body |
| Feb 1, 2020 at 22:24 | review | Suggested edits | |||
| Feb 1, 2020 at 23:49 | |||||
| Jan 28, 2020 at 12:21 | comment | added | Athanassios | View the answers with numpy integration, numpy arrays are far more efficient than Python lists. If the list is short it's no problem making a copy of it from a Python list, if it isn't then perhaps you should consider storing the elements in numpy array in the first place. | |
| May 25, 2019 at 10:30 | review | Close votes | |||
| May 26, 2019 at 9:31 | |||||
| May 3, 2019 at 8:20 | history | edited | kmario23 | edited tags | |
| Mar 18, 2019 at 9:32 | answer | added | sahasrara62 | timeline score: 1 | |
| Nov 14, 2018 at 18:49 | answer | added | Siddharth Satpathy | timeline score: 3 | |
| Sep 25, 2018 at 15:47 | answer | added | pylang | timeline score: 3 | |
| Sep 10, 2018 at 18:51 | answer | added | FatihAkici | timeline score: 5 | |
| May 29, 2018 at 13:44 | history | edited | Aaron Hall♦ | CC BY-SA 4.0 | deleted 18 characters in body |
| May 25, 2018 at 21:56 | answer | added | Ketan | timeline score: 16 | |
| May 21, 2018 at 6:20 | comment | added | smci | a) Is it guaranteed that item is in the list, or else how we should handle the error case? (return None/ raise ValueError) b) Are list entries guaranteed to be unique, and should we return the first index of a match, or all indexes? | |
| May 12, 2018 at 20:56 | comment | added | Ṃųỻịgǻňạcểơửṩ | Are you returning: [1] The lowest index in case there are multiple instances of "bar", [2] All the indices of "bar"? | |
| Mar 28, 2018 at 21:02 | history | edited | Pelle | This question does not relate to indexing | |
| Mar 7, 2018 at 19:09 | answer | added | Ankit Gupta | timeline score: 7 | |
| Mar 4, 2018 at 8:39 | answer | added | Hamed Baatour | timeline score: 18 | |
| Jan 30, 2018 at 21:10 | answer | added | mirapole | timeline score: 4 | |
| Oct 30, 2017 at 23:29 | history | edited | TerryA | Added indexing tag - since this question is about indexes of a list. | |
| Aug 22, 2017 at 3:08 | answer | added | Aaron Hall♦ | timeline score: 59 | |
| Aug 12, 2017 at 20:01 | answer | added | jihed gasmi | timeline score: 6 | |
| Aug 8, 2017 at 5:01 | answer | added | PythonProgrammi | timeline score: 35 | |
| Apr 15, 2016 at 16:14 | history | protected | Sede | ||
| Nov 17, 2015 at 19:05 | answer | added | rbrisuda | timeline score: 63 | |
| Nov 11, 2015 at 5:16 | answer | added | Arnaldo P. Figueira Figueira | timeline score: 27 | |
| Jul 5, 2015 at 13:12 | answer | added | Coder123 | timeline score: 7 | |
| May 17, 2015 at 3:21 | answer | added | dylankb | timeline score: 14 | |
| Jan 15, 2015 at 9:54 | history | edited | Martin Thoma | CC BY-SA 3.0 | PEP8 |
| Dec 30, 2014 at 21:03 | answer | added | MrWonderful | timeline score: 22 | |
| May 26, 2014 at 4:26 | answer | added | user3670684 | timeline score: 75 | |
| Mar 28, 2014 at 9:11 | answer | added | bvanlew | timeline score: 18 | |
| Sep 12, 2013 at 8:35 | history | edited | Octavian Helm | CC BY-SA 3.0 | deleted 3 characters in body; edited title |
| Jun 25, 2013 at 15:07 | answer | added | FMc | timeline score: 246 | |
| Jun 19, 2013 at 22:31 | answer | added | TerryA | timeline score: 724 | |
| May 29, 2013 at 19:17 | answer | added | Mathitis2Software | timeline score: 21 | |
| May 29, 2013 at 7:17 | answer | added | kiriloff | timeline score: 25 | |
| May 16, 2013 at 16:45 | answer | added | Graham Giller | timeline score: 57 | |
| Apr 16, 2013 at 10:19 | answer | added | tanzil | timeline score: 110 | |
| S Mar 3, 2013 at 16:15 | history | suggested | pradyunsg | CC BY-SA 3.0 | formatting; tags |
| Mar 3, 2013 at 16:12 | review | Suggested edits | |||
| S Mar 3, 2013 at 16:15 | |||||
| Jan 8, 2013 at 15:41 | review | Suggested edits | |||
| Jan 8, 2013 at 15:48 | |||||
| Aug 21, 2012 at 12:01 | answer | added | savinson | timeline score: 111 | |
| Aug 30, 2011 at 9:40 | answer | added | HongboZhu | timeline score: 159 | |
| Oct 7, 2008 at 1:41 | vote | accept | Eugene M | ||
| Oct 7, 2008 at 1:40 | answer | added | Alex Coventry | timeline score: 6105 | |
| Oct 7, 2008 at 1:39 | history | asked | Eugene M | CC BY-SA 2.5 |