For loops with range function in Python

Published: 02 January 2021
on channel: ifactner
775
18

Learn to use for loops in Python with range function. This Python for beginners in Hindi Urdu lesson 19 teaches you about a built-in range() function.
We use the range function in Python to return a sequence of numbers. The numbering starts from 0 by default and incremented by 1. It stops before the last number specified. We can specify the start, stop and step arguments to control the range function. In this tutorial, we learn to print different sequences of numbers with different steps using the for loop and range function.
We write and understand the following lines of code in Python to understand about Range() function and for loops:
For loop and range function

numbers = [1, 2, 3, 4, 5]
for number in numbers:
print(number)
print('List finished')

for range_number in range(1, 10, 2):
print(range_number)
print('Range 1 finshed')
for range_num in range(0, 10, 2):
print(range_num)

Watch also:
1. Python basics programming tutorial for beginners | Python print hello world code in Hindi Urdu - part 1 at    • Python basics programming tutorial for beg...  .

2. Print function in Python to display multiple lines | Python programming tutorial in Hindi Urdu at    • Print function in Python to display multip...  

3. Introduction to Variables in Python | Python programming tutorial in Hindi Urdu at    • Introduction to Variables in Python | Pyth...  

4. Concatenation of strings and variables in PYTHON | Concatenating and type function in Python at    • Concatenation of strings and variables in ...  

5. Input function in Python with string function and concatenation | Python for beginners in Hindi Urdu at    • Input function in Python with string funct...  

6. Input function in Python with str and int functions for calculations | Python in Hindi Urdu at    • Input function in Python with str and int ...  

7. Python tutorial in Hindi Urdu | Convert cm to inches & Kgs to pounds in Python programming lesson 7 at    • Python tutorial in Hindi Urdu | Convert cm...  

8. Python string slicing and string indexes | Python tutorial for beginners in Hindi Urdu lesson 8 at    • Python string slicing and string indexes |...  

9. Formatted string in Python F-Strings in Python for string formatting for beginners in Hindi Urdu at    • Formatted string in Python F-Strings in Py...  

12. Arithmetic operators precedence and BEDMAS rule in Python | Python for beginners in Hindi Urdu 12 at    • Arithmetic operators precedence and BEDMAS...  

13. Implicit and explicit conversion concepts in Python | Python for beginners in Hindi Urdu lesson 13 at    • Implicit and explicit conversion concepts ...  

15. While loop in Python pattern printing | Python tutorial for beginners in Hindi Urdu lesson 15 at    • While loop in Python pattern printing | Py...  

18. For loop in Python programming part 2 | Python tutorial for beginners in Hindi Urdu lesson 18 at    • For loop in Python programming part 2 | Py...  

16. Writing a code program in Python using While loop and if statement | Python for beginners in Hindi at    • Writing a code program in Python using Whi...  

Full Python course in Hindi Urdu playlist at    • Python programming course in Hindi Urdu  .


On this page of the site you can watch the video online For loops with range function in Python with a duration of hours minute second in good quality, which was uploaded by the user ifactner 02 January 2021, share the link with friends and acquaintances, this video has already been watched 775 times on youtube and it was liked by 18 viewers. Enjoy your viewing!