File tree Expand file tree Collapse file tree 2 files changed +46
-7
lines changed Expand file tree Collapse file tree 2 files changed +46
-7
lines changed Original file line number Diff line number Diff line change 1+ studentNames = list ()
2+ fr = open ('C:\Users\Josh\PYTHON100\courseenrollees 9-30-13 - Sheet1.csv' )
3+ lines = fr .readlines ()
4+ fr .close ()
5+ #print(type(lines))
6+ #print(len(lines))
7+ for line in lines :
8+ segments = line .split (',' )
9+ studentNames .append (segments [0 ] + ", " + segments [1 ])
10+ # Python is smart enough to not keep on appending to this file when run multiple times
11+ fw = open ('C:\Users\Josh\PYTHON100\IntroToPython\week-01\students.txt' , 'w' )
12+ for name in studentNames :
13+ fw .write (str (name ) + '\n ' )
14+ fw .close ()
Original file line number Diff line number Diff line change 1- Students in the 2013 Python Cert Class
2-
3- Name:
4- Programming Background:
5-
6- Languages:
7-
1+ lastName, firstName
2+ Antoun, Jo-Anne
3+ AuBuchon, Harlan
4+ Bae, Andrew
5+ Chan, Lawrence
6+ Chhen, Rithy
7+ Colwell, Kimberly
8+ Cypret, Luke
9+ Eaton, Sako
10+ Edson, Howard
11+ Flagg, Nate
12+ Gapasin, Anne-Lynn
13+ Grizzel, Travis
14+ Ivers, Brandon
15+ Kang, Dong
16+ Leblanc, Adam
17+ Onen, Omer
18+ Parrish, Brent
19+ Pei, Guangyu
20+ Petrova, Maria
21+ Popish, Mario
22+ Rajagopalan, Sridharan
23+ Salkodu Parameshwar, Maitri
24+ Savage, Nathan
25+ Schmitz, Brian
26+ Small, Edward
27+ Smith, Richard
28+ Thach, Phuc
29+ Tran, Linh
30+ Warren, Catherine
31+ Werner, Steven
32+ Wright, Duane
You can’t perform that action at this time.
0 commit comments