microsoft/PythonProgrammingPuzzles

New puzzle

mlb2251 opened this issue · 2 comments

def sat(xs: List[int]): 
    return len(xs) == 7 and xs == xs[::-1] and sum(xs[:2]) == sum(xs[2:]) and all([x!=0 for x in xs])

Solution hidden below so that other people can try to solve it.

Reveal solution
def sol():
    return [1,1,-1,2,-1,1,1]

Please post your solutions to this puzzle in the comments using the following formatting:

<details><summary>Reveal solution</summary>

```python
def sol():
    return "world"  # replace with your solution
```
</details>
Reveal solution
def sol():
    return [1, 1, 1, -2, 1, 1, 1]
Reveal solution
def sol():
    return [2,5,-5,10,-5,5,2]