python not equal operator

Python, not equal operator returns True if two variables are of the same type and have different values, if the values are same then it returns False. Python is dynamic and strongly typed language, so if the two variables have the same values but they are of a different type, then not equal operator will return True.

You can use != and is not for not equal operation in Python.

Example

 

[Total: 1    Average: 5/5]
admin
Leave a Reply

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages