def Xbonacci(signature,n):
count = 0
while len(signature) != n:
sum = 0
for i in signature[count:]:
sum = sum + i
signature.append(sum)
count += 1
return signature
print(Xbonacci([1,0,0,0,0,0,0,0,0,0], 20))
My code excutes correctly and there isnt any errors, but it apparently takes longer than it should.
How can i find out the time taken to execute the program?
P.S This is a challenge on Codewars.
Please dont optimize my code, thats what i'd like to do once i get the execution time sorted.