About 23,900,000 results
Open links in new tab
  1. python - Position in an list? - Stack Overflow

    To check if an object is in a list, use the in operator: >>> words = ['a', 'list', 'of', 'words'] >>> 'of' in words True >>> 'eggs' in words False Use the index method of a list to find out where in the …

  2. Python List index() – Find Index of Item | GeeksforGeeks

    Apr 27, 2025 · index() method in Python is a helpful tool when you want to find the position of a specific item in a list. It works by searching through the list from the beginning and returning …

    Missing:

    • Word

    Must include:

  3. Python List index() Method - W3Schools

    The index() method returns the position at the first occurrence of the specified value. Required. Any type (string, number, list, etc.). The element to search for. Optional. A number …

    Missing:

    • Word

    Must include:

  4. 4 Ways to Find a Word in a List in Python: A Comprehensive Guide

    Feb 15, 2023 · In Python, finding a specific word or element within a list is a familiar task developers often search for. This tutorial will teach us four effective methods to find a word in a …

  5. Finding the position of an item in a list in Python 3

    Sep 3, 2024 · Finding the position of an item in a list is a common task in Python programming. The index() method provides a convenient way to find the position of an item in a list. …

    Missing:

    • Word

    Must include:

  6. Find the position of an element in a list in Python - CodeSpeedy

    In this Python tutorial, we will learn how to find the position of an element in a list in Python. To find the position of an element in a list, we need to understand the concept of the index of the …

    Missing:

    • Word

    Must include:

  7. python - How to get item's position in a list? - Stack Overflow

    Dec 13, 2008 · list_ = ["pen", "david"] for i in list_: list_.index(i) The code literally takes each object and parses the postion of i. Additionally if you wanted to check a specific element you could …

    Missing:

    • Word

    Must include:

  8. performance - Find position of a word in a list in Python - Code …

    Apr 10, 2016 · \$\begingroup\$ @Adam.Harris: Use print(..., position + 1) instead of print(..., position) You could also use enumerate(word_list, 1) instead of enumerate(word_list) …

  9. Python program to find String in a List - GeeksforGeeks

    Jan 7, 2025 · In this article, we’ll explore several methods to find a string in a list, starting from the most efficient to the least. The 'in' operator is the simplest and fastest way to check if a string …

  10. How can I get a value at any position of a list - Python Help ...

    Sep 30, 2022 · I have a numbers added in the list, and want to get a value at a particular number from the list. I tried one = (open(input("Open list: ")).read().splitlines()) list = one …

  11. Some results have been removed
Refresh