Tagged: lists
Everything tagged "lists", newest first.
Python Coding Exercise #50: Working with Numbers
A beginner Python exercise on collecting statistics in a loop — read numbers until the user types zero, then print the count, the sum, the mean, and how many numbers were positive and negative.
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.
Core Data Structures in Python: Lists, Tuples, Sets and Dictionaries
A beginner-friendly guide to Python's four core data structures — lists, tuples, sets and dictionaries — with examples, a comparison table, and a simple guide to choosing the right one.
Python Coding Exercise #02: Sorting Names
A beginner Python exercise on lists, the sort() method, and for loops — fix a program so the names of the seven brothers from "Seitsemän veljestä" print in alphabetical order.