Tagged: for-loop
Everything tagged "for-loop", newest first.
Python Coding Exercise #62: Substrings, Parts 1 and 2
Two beginner Python exercises on slicing in a loop — print all the substrings of a word that start with its first character, then all the substrings that end with its last character, using for loops and while loops.
Python Coding Exercise #58: A Line and a Rectangle of Hashes
Two beginner Python exercises on repeating output — print a line of hash characters of a chosen width, then repeat that line to draw a rectangle, with a for loop and a while loop compared.