Skip to content
CodeAllow
  • Pandas
  • Seaborn
  • String
  • NumPy
  • Python datetime
  • Tkinter
Menu Close
  • Pandas
  • Seaborn
  • String
  • NumPy
  • Python datetime
  • Tkinter

Python List Contains

  • Post published:September 21, 2022
  • Post category:List

The in keyword is used to check if a list contains a specified item.

In this blog post, you will learn how to use python list contains.

Step 1: Create a list

my_list = [1, 2, 3, 4, 5]

Step 2: Print the list

print(3 in my_list)

Output:

True

You Might Also Like

Read more about the article Python List with FOR Loop

Python List with FOR Loop

September 20, 2022
Read more about the article Python List reverse() Method

Python List reverse() Method

September 21, 2022
Read more about the article Python List insert() Method

Python List insert() Method

September 21, 2022

List

  • Python List with range()
  • Python Create a List
  • Python List with WHILE Loop
  • Python List using enumerate()
  • Python List using zip()
  • Python List Comprehension
  • Python List pop() Method
  • Python List append() Method
  • Python List Length
  • Python List with FOR Loop
  • Python List insert() Method
  • Python List Contains
  • Python List of Lists
  • Python List reverse() Method
  • Python List Slice
  • Python List to String
  • Python List sort() Method
  • Python List extend() Method
  • Python List remove() Method
  • Python List index() Method
  • How to create a list in Python
  • Privacy Policy
  • About
  • Contact Us
  • Disclaimer for Code Allow
  • Terms and Conditions
Copyright [2022] - CodeAllow