A
A
Anonymous Unknown2019-02-27 00:46:02
Python
Anonymous Unknown, 2019-02-27 00:46:02

Loop in Python 3.2.2..?

I'm trying to implement a logic game. It needs an array that will contain the numbers [1000-9999], it is clear that 9k numbers cannot be entered manually. Tell me how to implement such an array in Python 3 or advise something else

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-02-27
@SillyIdiot

numbers = [n for n in range(1000, 10000)]
or
numbers = list(range(1000, 10000))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question