Question #927

What is the output of the code snippet below?
print(sum(range(-1, +1)))

The range() function stops before the second argument. In this case, the last integer of the iterator is 0 . (w3schools.com/python/ref_func_range.asp)


Comment on Disqus:

Question difficulty: πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅


Similar questions: