def get_rounds(number):
"""Create a list containing the current and next two round numbers.
:param number: int - current round number.
:return: list - current round and the two that follow.
"""
rounds_list = []
for n in number:
rounds_list.append([n, n + 1, n + 2])
return rounds_list
gives me error TypeError: 'int' object is not iterable
When I check in onther online IDE’s it gives me the right result
number is an integer. You can’t loop over a number.
That’s because you’re not running the unit tests. You’re running with different data than the tests use. You’re going to run into trouble if you’re running different code than what the unit tests run, so you really should be using those.