Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Narcissistic number python

def narcissistic( value ):
    value = str(value)
    size = len(value)
    sum = 0
    for i in value:
        sum += int(i) ** size
    return sum == int(value)
Comment

PREVIOUS NEXT
Code Example
Python :: python break when key pressed 
Python :: python is integer 
Python :: set axis plt python 
Python :: remove duplicates from list python 
Python :: click button in selenium python 
Python :: what is self keyword in python 
Python :: sqlalchemy lock row 
Python :: remove all zeros from list python 
Python :: python check numpy arrays equal 
Python :: read csv exclude index pandas 
Python :: what is values_list in django orm 
Python :: pandas change column name from a dictionary 
Python :: python install bigquery 
Python :: pickle.load python 
Python :: add a column while iterating rows pandas 
Python :: open text with utf-8 
Python :: reset a turtle python 
Python :: solve equation python 
Python :: url in form action django 
Python :: python diamond 
Python :: user nextcord interactions 
Python :: drop rows with null date in pandas 
Python :: jupyter notebook make new lines 
Python :: Network.py socket 
Python :: puissance python 
Python :: setting a condition for perfect square in python 
Python :: flask_mail 
Python :: move mouse round in python 
Python :: find the max value in dictionary python 
Python :: array as an input in python 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =