Changes

Jump to: navigation, search

OPS435 Python Lab 3

7 bytes added, 11:40, 3 June 2017
PART 3 - Iterating Over Lists
for value in list_of_numbers:
print(square(value))
</source>You should see from the previous demonstration the advantage of using lists with functions. Although useful, the demonstration above only prints the squares as opposed to saving them for future use. The next demonstration uses a function that loops through lists, squares the values, but saves the squares in a new list.<br><br>
13,420
edits

Navigation menu