__ne__


Definition
Return with True or False that values are not equal.

Syntax
__ne__

Parameters
Object

Examples
The method tested whether the values are not equal.
 >>> Fraction(1).from_decimal(1).__ne__(Fraction(0,1))
True
>>>

Fraction.__ne__Fraction
The equal to:
 >>> Fraction(0,1).real.__ne__(Fraction(0, 1))
False

The return is:
 >>> Fraction("22.1").denominator.__ne__(Fraction(22.1).denominator)
True
>>>

str.split().__ne__[list]
The return as following:
 >>> x=str.split("Python Lake")
>>> x
['Python', 'Lake']
>>> y=["Python", "Lake"]
>>> x==y
True
>>> x.__eq__(y)
True
>>> str.split("Python Lake").__ne__(["Python", "Lake"])
False
>>> 


str.istitle().__ne__(False)
The return are equal to:
 >>> 
>>> "Python Lake".istitle().__eq__(True)
True
>>> "Python Lake".istitle().__ne__(False)
True
>>> "Python lake".istitle().__eq__(True)
False
>>> "python lake".istitle().__eq__(True)
False
>>> "PYTHON LAKE".istitle().__eq__(True)
False
>>>


str.isspace().__ne__(True)
The following are outcome:
 >>> str.isspace("").__eq__(False)
True
>>> x=""
>>> x.isspace().__ne__(True)
True


str.isdecimal().__ne__(False)
The returned as:
 >>> 
>>> "Python Lake".isdigit()
False
>>> x="Python Lake"
>>> x.isdigit()
False
>>> str.isdigit(x)
False
>>> str.isdigit(x).__eq__(False)
True
>>> str.isdigit(x).__ne__(False)
False

The determined that the maximum value of set is not equal to round(.99).
import math
tuple=(math.acos(1),math.asin(.22),math.cos(-1.1), math.atan(.99))
y=max(map(lambda a: a, tuple)).__ne__(round(1.1))
print(y)
>>> 
False
>>>


class.....: def __init__()......:....string__ne__()
The function tested whether the string value is single word, or contain non-string values through input().
 class str_methods():
    def __init__(self, a,b,c):

        identifier=str.isidentifier(a)

        if str.isidentifier(a).__eq__(True):
            print("Full name should not contain special characters or numbers")
            
        else:
            print("Your full not name accepted")

        
      
        alpha=str.isalpha(b)
        
        if alpha.__ne__(False):
            print("Full name accepted")

            lower=str.lower(c)
            if lower.__eq__(str.lower(c)):
                 str.upper(c)
                 print("System convert your name to uppercase:", str.upper(c))
            else:
                 print("Your name accepted")

        else:
            print("Full name can't be one word")

                    

input_text=input("Please enter  your full name: ")

str_methods(input_text, input_text,input_text)
    
          

>>> 
Please enter your full name: Adil22
Full name should not contain special characters or numbers
Full name can't be one word
>>>        


Comments