Can I generate a series of numbers with a for loop? Glad you asked.
You can use the range() function to generate a series of numbers. Example:
for number in range(1, 6):
print(number)
Output:
1
2
3
4
5
-------------------------Subscribe----------------------------
• If you like to see a variety of fun and interactive projects written in Python
• If you love ☕ and 🐶 WAIT! - Yeah! Definitely, coffee and dogs!
-----------------------------------------------------------------------
-------------------------Socials----------------------------
• Twitter: / iftodd1
• Facebook: / iftodd
• Instagram: / if_todd
------------------------------------------------------------------
-------------------------Support----------------------------
You can support me here: / if_todd
--------------------------------------------------------------------
How to generate numbers in a for loop? #python #shorts #forloop