<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: exerror8</title>
    <description>The latest articles on DEV Community by exerror8 (@exerror8).</description>
    <link>https://dev.to/exerror8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F836067%2F6759d8b8-f83d-4d92-8e07-3336dfe21d0a.png</url>
      <title>DEV Community: exerror8</title>
      <link>https://dev.to/exerror8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/exerror8"/>
    <language>en</language>
    <item>
      <title>How to check List Equality in Python</title>
      <dc:creator>exerror8</dc:creator>
      <pubDate>Thu, 24 Mar 2022 11:12:39 +0000</pubDate>
      <link>https://dev.to/exerror8/how-to-check-list-equality-in-python-5c4c</link>
      <guid>https://dev.to/exerror8/how-to-check-list-equality-in-python-5c4c</guid>
      <description>&lt;p&gt;Hello guys. How are you all? I hope you all fine. In this &lt;a href="https://exerror.com/python-tutorial/"&gt;tutorial &lt;/a&gt;we will learn about How to check List Equality in Python. so without wasting time lets learn about of this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: Use == operator
&lt;/h2&gt;

&lt;p&gt;By using == you can check if both the list are equal or not. Lets learn about of this by given below example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;l1 = [11,12,13,14,15]&lt;br&gt;
l2 = [12,1,8,15,14,8]&lt;br&gt;
l3 = [11,12,13,14,15]&lt;br&gt;
print(l1 == l2)&lt;br&gt;
print(l1 == l3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;False&lt;br&gt;
True&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Use == and numpy.all()
&lt;/h2&gt;

&lt;p&gt;By using == and numpy.all() you can check if both the list are equal or not. Lets learn about of this by given below example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import numpy as np&lt;br&gt;
l1 = [11,12,13,14,15]&lt;br&gt;
l2 = [12,1,8,15,14,8]&lt;br&gt;
l3 = [11,12,13,14,15]&lt;br&gt;
print((np.array(l1) == np.array(l2)))&lt;br&gt;
print((np.array(l1) == np.array(l3)))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output&lt;/p&gt;

&lt;p&gt;&lt;code&gt;False&lt;br&gt;
[ True  True  True  True  True]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Conclusion&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
It’s all About this Tutorial. Hope all methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you?&lt;/p&gt;

</description>
      <category>python</category>
    </item>
  </channel>
</rss>
