Index List
This kind of list is often useful when preparing indices or looping over positions. Write a function fizz_array that takes a non-negative number n. Return a list of numbers from 0 to n - 1, inclusive, in the correct order.
Примеры
Ввод
4Вывод
[0, 1, 2, 3]Ввод
1Вывод
[0]Ввод
10Вывод
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]Нужно реализовать
def fizz_array(n: int) -> list[int]:
Теги
listsarray
Accedi per vedere la cronologia degli invii
AccediAccedi per usare l'AI Mentor
AccediVisible tests
1
Input
4Expected
[0,1,2,3]2
Input
1Expected
[0]3
Input
10Expected
[0,1,2,3,4,5,6,7,8,9]4
Input
0Expected
[]5
Input
2Expected
[0,1]6
Input
11Expected
[0,1,2,3,4,5,6,7,8,9,10]Focus radio
Paused · SomaFM · Fluid