Question: Hello, I have the follwoing HTML, CSS, and Python code. I need to use python to loop though CSV data that I have parsed, and
Hello, I have the follwoing HTML, CSS, and Python code. I need to use python to loop though CSV data that I have parsed, and to output it to an HTML file to fill the nametags accorting to the
id. I must strctly use Python to loop thoough and output. Any help would be appreciated.
/*HTML FILE*/
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Jill
Smith
Web Developer
Regis University
Denver, CO
Content
/*CSS FILE*/
@charset "UTF-8";
/* CSS Document */ .header{ height: 25mm; width: 275mm; background-color: indianred; align-content: center; text-align: justify; border: dotted #000000; margin: auto auto 5px; } .container { height: 277.5mm; width: 215mm; background-color: white; align-content: center; border: dotted #000000; margin: auto; } .leftColumn { float: left; width: 86mm; height: 277mm; margin-left: 17mm; border: #000000 }
#leftBox{ width: 86mm; height: 59mm; margin-left: 17mm; float: left; margin-top: 14mm; }
#b1lFN{ font-size: 22px; text-align: center; padding-bottom: 10px; padding-top: 2px; font-weight: bold; }
#b1lLN{ font-size: 12px; text-align: center; padding-bottom: 10px; }
#b1lT{ font-size: 14px; text-align: center; padding-bottom: 10px; font-weight: bold; }
#b1lSch{ font-size: 14px; text-align: center; }
#b1lFrom{ font-size: 12px; text-align: center; padding-top: 4px; }
.rightColumn { float: right; width: 86mm; height: 277mm; margin-right: 17mm; border: #000000 }
#rightBox{ width: 86mm; height: 59mm; margin-left: 4.5mm; float: right; margin-right: 17mm; margin-top: 14mm; }
#b1rFN{ font-size: 22px; text-align: center; padding-bottom: 10px; padding-top: 2px; font-weight: bold; }
#b1rLN{ font-size: 12px; text-align: center; padding-bottom: 10px; }
#b1rT{ font-size: 14px; text-align: center; padding-bottom: 10px; font-weight: bold; }
#b1rSch{ font-size: 14px; text-align: center; }
#b1rFrom{ font-size: 12px; text-align: center; padding-top: 4px; }
.footer{ height: 25mm; width: 275mm; background-color: indianred; align-content: center; text-align: justify; border: dotted #000000; margin: auto auto 5px;
}
/*PYTHON FILE*/
import csv stareaFrom = [] html_output = '' with open("registrant_data.csv", "rU") as csv_file: myFile = csv.reader(csv_file)
for line in myFile: names = {line[2]} titleOf = {line[12]} schOf = {line[13]} cityOf = {line[6]} stateOf = {line[7]}
for city in cityOf: print(city)
/*CSV FILE*/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
