What is the time complexity of the sum() function?
It will make Theta(n) next calls on the iterator, and Theta(n) additions, where n is the number of items you're summing.
That's as specific as you can be for the time complexity of an algorithm that calls unknown code. If the time taken for each addition depends on n (as for example it would when summing lists, like sum(list(range(i)) for i in range(n))), then that's going to affect the overall time complexity.
What is the time complexity of sum() in Python?