spacepaste
new
Paste details
reply
|
raw
with
open
(
"labdata.txt"
)
as
labdata
:
str_coords
=
(
line
.
split
()
for
line
in
labdata
)
coords
=
((
int
(
s
)
for
s
in
l
)
for
l
in
str_coords
)
x_sum
,
y_sum
=
(
sum
(
c
)
for
c
in
zip
(
*
coords
))
print
(
x_sum
,
y_sum
)