Home >Backend Development >Python Tutorial >What does the python double equal sign mean?

What does the python double equal sign mean?

藏色散人
藏色散人Original
2019-07-06 11:26:3846227browse

What does the python double equal sign mean?

What does the double equal sign mean in python?

pythonThe double equal sign is a Python comparison operator, which means equal and is used to compare whether objects are equal.

Assume variable a is 10 and variable b is 20: (a == b) Return False.

Example:

#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
a = 21
b = 10
 
if  a == b :
   print "a 等于 b"
else:
   print "a 不等于 b"

Output:

a 不等于 b

Related recommendations: "Python Tutorial"

The above is the detailed content of What does the python double equal sign mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn