Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Symmetrical Sum Python

### START FUNCTION
def symmetrical_sum(a):
    while a and a[0] != a[-1]:
        _, *a, _ = a
    return (a, sum(a))
### END FUNCTION
Source by athena.explore-datascience.net #
 
PREVIOUS NEXT
Tagged: #Symmetrical #Sum #Python
ADD COMMENT
Topic
Name
1+4 =