Question #377
Submitted by Answiki
on 01/11/2021 at 04:44:31 PM UTC
How to write the not equal operator in Python?
Merged questions
Answer
Submitted by Answiki
on 01/11/2021 at 04:47:20 PM UTC
In Python, the syntax for the not equal operator is !=. Here is a simple example:
>>> a=4
>>> b=6
>>> if (a!=b):
>>> print ('a not equal b')
a not equal b
Question by Answiki 01/11/2021 at 04:47:33 PM
What is the not equal operator in Python?
Answer by Answiki on 01/11/2021 at 04:47:20 PM
In Python, the syntax for the not equal operator is !=. Here is a simple example:
>>> a=4
>>> b=6
>>> if (a!=b):
>>> print ('a not equal b')
a not equal b
Question by Answiki 01/11/2021 at 04:44:31 PM
How to write the not equal operator in Python?
| # | ID | Query | URL | Count |
|---|---|---|---|---|
| 0 | 11975 | en | https://en.ans.wiki/377/how-to-write-the-not-equal-operator-in-python | 6 |
Icons proudly provided by Friconix.