为啥会报错【新手
表示很迷...
表示很迷...
2018-07-27
d = { 'Adam' : 95, 'Lisa': 85, 'Bart': 59} def gtr(name, score): if score<60 : return '<tr><td>%s<td><td style="color:red">%s<td><tr>' % (name, score) return '<tr><td>%s</td><td>%s</td></tr>' % (name, score) tds = [gtr(name,score) for name, score in d.iteritems()] print '<table border="1">' print '<tr><th>Name</th><th>Score</th><tr>' print '\n'.join(tds) print '</table>'
举报