Text Numbers

Sometimes numbers are needed as text rather than for calculations, such as labels, buttons, or screen output. Write a function fizz_array2 that takes a non-negative number n. Return a list of strings from 0 to n - 1, inclusive.

Примеры

Ввод
4
Вывод
["0", "1", "2", "3"]
Ввод
10
Вывод
["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Ввод
1
Вывод
["0"]

Нужно реализовать

def fizz_array2(n: int) -> list[str]:

Теги

listsarraystrings
PostgreSQLv16

Her vises resultatet af din kode

Visible tests
1
Input
4
Expected["0","1","2","3"]
2
Input
10
Expected["0","1","2","3","4","5","6","7","8","9"]
3
Input
1
Expected["0"]
4
Input
0
Expected[]
5
Input
3
Expected["0","1","2"]
6
Input
7
Expected["0","1","2","3","4","5","6"]
Focus radio
Paused · SomaFM · Fluid