Python 3 Basics # 11.2 | Nested For Loop in Python | Python for Beginners

Publicado em: 21 Abril 2019
no canal de: technologyCult
3,093
17

Python 3 Basics # 11.2 | Nested For Loop in Python | Python for Beginners

Python 3 Basics - Session # 11.2

Github Link - https://github.com/technologycult/Pyt...

For loops are traditionally used when you have a block of code which you want to repeat a fixed number of times. The Python for statement iterates over the members of a sequence in order, executing the block each time. Contrast the for statement with the ''while'' loop, used when a condition needs to be checked each iteration, or to repeat a block of code forever. For example:

For loop from 0 to 2, therefore running 3 times.


for x in range(0, 3):
print("We're on time %d" % (x))

When you have a block of code you want to run x number of times, then a block of code within that code which you want to run y number of times, you use what is known as a "nested loop". In Python, these are heavily used whenever someone has a list of lists - an iterable object within an iterable object.

for x in range(1, 11):
for y in range(1, 11):
print('%d * %d = %d' % (x, y, x*y))

Topic to be covered - Nested For Loops in Python 3
0 0 0
x 0 2
y 0 3
z 0 4

for x in range(3):
for y in range(4):
for z in range(5):
print(f'({x},{y},{z})')

All the playlist of this youtube channel
========================================

1. Data Preprocessing in Machine Learning
   • Data Preprocessing in Machine Learning| Li...  

2. Confusion Matrix in Machine Learning, ML, AI
   • Confusion Matrix in Machine Learning, ML, AI  

3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
   • Anaconda | Python Installation | Spyder | ...  

4. Cross Validation, Sampling, train test split in Machine Learning
   • Cross Validation | Sampling | train test s...  

5. Drop and Delete Operations in Python Pandas
   • Drop and Delete Operations in Python Pandas  

6. Matrices and Vectors with python
   • Matrices and Vectors with python  

7. Detect Outliers in Machine Learning
   • Detect Outliers in Machine Learning  

8. TimeSeries preprocessing in Machine Learning
   • TimeSeries preprocessing in Machine Learning  

9. Handling Missing Values in Machine Learning
   • Handling Missing Values in Machine Learning  

10. Dummy Encoding Encoding in Machine Learning
   • Label Encoding, One hot Encoding, Dummy En...  

11. Data Visualisation with Python, Seaborn, Matplotlib
   • Data Visualisation with Python, Matplotlib...  

12. Feature Scaling in Machine Learning
   • Feature Scaling in Machine Learning  

13. Python 3 basics for Beginner
   • Python | Python 3 Basics | Python for Begi...  

14. Statistics with Python
   • Statistics with Python  

15. Data Preprocessing in Machine Learning
   • Data Preprocessing in Machine Learning| Li...  

16. Sklearn Scikit Learn Machine Learning
   • Sklearn Scikit Learn Machine Learning  

17. Linear Regression, Supervised Machine Learning
   • Linear Regression | Supervised Machine Lea...  


Nesta página do site você pode assistir ao vídeo on-line Python 3 Basics # 11.2 | Nested For Loop in Python | Python for Beginners duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário technologyCult 21 Abril 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 3,093 vezes e gostou 17 espectadores. Boa visualização!