A shorter way would make use of some built in list methods:

```
def lucky_sum(a, b, c):
  all = [a, b, c] # make a list 
  if 13 not in all:  # if there's no 13
    return sum(all)
  else: 
    return sum(all[:all.index(13)])  # otherwise, return a slice up until the 13
```