Python: While Loops

Python

This is post 25 of 30 in the series “Introduction to Python” Go to Chapter 51 of A Smarter Way. Recall for loops: http://gnorman.org/2018/10/02/python-for-loops/ for friend in friends: print(“Hello, ” + friend.title() + “!”) For loops are good for meeting a single condition, once. But sometimes you need to keep performing the matching operation. This …

Python: Nested for Loops

Python

This is post 21 of 30 in the series “Introduction to Python” Go to Chapter 22 in A Smarter Way. You can put a for-loop inside another for-loop: first_names = [“Bill”, “Joel”, “Jeff”, “Jim”] last_names = [“E-boy”, “E-man”, “Jefferson”, “O’theJungle”] full_names – [ ] for a_first_name in first_names:     for a_last_name in last_names:         full_names.append(a_first_name …