0
def calc(num):
if num == 1:
return 1
else:
return [2 * calc(num-i) + math.pow(2,i) - 1 for i in range (1, num)]
當我運行它,它給了我這個錯誤:遞歸函數類型錯誤:只能串聯列表(不是「浮動」),列出
TypeError: can only concatenate list (not "float") to list. How can i fix this?