Tagged: slicing
Everything tagged "slicing", 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 #23: Slicing and the min() and max() Functions
Two short beginner Python exercises — use string slicing to print the last three digits of a phone number, and use the built-in min() and max() functions to find the smallest and largest of four numbers.