How to Use range() in Python

preview_player
Показать описание
What if you want to generate a list of numbers? You can use the built-in range() function.

There are three ways you can call range():
1. range(stop) takes one argument.
2. range(start, stop) takes two arguments.
3. range(start, stop, step) takes three arguments.

Рекомендации по теме
Комментарии
Автор

Thank you. This was very clear to understand and I like the additional examples at the end.

dlizard
Автор

0:28 It actually creates a *range* object, not a *list*.

simonmaracine
Автор

Concise, easily understood. An example like range(10, 0, -1) might have shown further practical uses of range. Thanks.

quaternion-pi
Автор

And if i want the range to never stop until
N number what can i do please help

tassnimchekir
Автор

Can I try -
range(start_time, stop_time, steps= 5min:10sec:20000microseconds)
Or something similar to??

cbmcbm
Автор

Very fine post: concise, rational, to the point.
You want to speak a wee bit further away from the microphone put a cloth on your table or desk, and maybe be careful about hard walls around you: you're generating a wee bit of annoying echo in your audio and a lot of lip and throat action.
But the content is just fine.
On music videos, e.g. the famous "We Are The World" video, you often see people using mikes with a screen over them between their lips and the cover of the microphone. This is to cut out air-sounds, of which you have a lot in your audio here. Distance will solve some of it; the screen gadget is good if you'replanning on a lot of recording. The ambient-echo problem is often caused by your surroundings. Professional recording spaces have completely soft surfaces. It's worthwhile coming as close to this as you can. Curtains. Tablecloths. carpets...
Good luck: your material is great, and very worthwhile continuing.

TheDavidlloydjones