def square_of_sum(L):
p = []
for i in L :
p.append(i*i)
return sum(p)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
p = []
for i in L :
p.append(i*i)
return sum(p)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2019-09-08
最新回答 / 杭州李乾坤
python3
print([x * 100 + y * 10 + z for x in range(1, 10) for y in range(0, 10) for z in range(0, 10) if x == z])
2019-09-08
最新回答 / qq_旧时光_29
s=('Python was started in 1989 by "Guido".\nPython is free and easy to learn.') print(s)print需要换行
2019-09-07
# -*- coding: utf-8 -*-
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
2019-09-06