Changes

Jump to: navigation, search

OPS435 Python Lab 5

18 bytes added, 10:22, 22 September 2017
PART 1 - Reading Data From Files
</source>
<blockquote>{{Admon/caution|style="padding-left:25px"|Creating a List of Stripped Text|A common (and preferred) method to store a list of stripped text is to use a store file contents into a variable, then use a loop to grow (i.e. "append") each stripped line. There are a couple of important things to note:<ol><li>You need to initialize the list as empty (eg. new-list=&#61;[])</li><li>Use the '''append ()''' function to grow each line (using the '''strip() ''' function) within the loop</li></ol>}}</blockquote>
=== Create a Python Script Demonstrating Reading Files ===
13,420
edits

Navigation menu