sum every n elements python