“Для _ в диапазоне Python” Ответ

Для примера петли Python 3

 for num in nums:
     for letter in 'abs':
         print(num, letter)
Silly Sheep

Диапазон Python Start с 1

>>> def range1(start, end):
...     return range(start, end+1)
...
>>> range1(1, 10)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Homely Hummingbird

потому что я в диапазоне Python

for i in range(start, end):
  expression
hateschoollovecoding

Диапазон (N, N) Python

# if numbers are same in the range function then,
# the range function outputs empty range
# this is because, there are no integers b/w n and n
for i in range(1,1):
  print("runs")

# prints nothing
 
TeeJay

Для _ в диапазоне Python

When you are not interested in some values returned by a function 
we use underscore in place of variable name . 
Basically we don't care about the iterator value, just that it 
should run some specific number of times.
rng70

для _ в диапазоне

When you are not interested in some values returned by a function we use underscore in place of variable name . 
Basically it means you are not interested in how many times the loop is run till now just that it should run some specific number of times overall.

Suenoo

Ответы похожие на “Для _ в диапазоне Python”

Вопросы похожие на “Для _ в диапазоне Python”

Смотреть популярные ответы по языку

Смотреть другие языки программирования