Python: Exemplos interessantes: Difference between revisions
|  (Criou a página com "= Example 1 =   style1_col1_style2_col2 = [     ('s-green', '95%', 's-red', '8%'),     ('s-yellow', '85%', 's-yellow', '70%'),     ('s-green', '95%', 's-good', '95%')   ]...") | |||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| = Example  | = Example - Interact over a list of sets. = | ||
|   style1_col1_style2_col2 = [ |   style1_col1_style2_col2 = [ | ||
|      ('s-green', '95%', 's-red', '8%'), |      ('s-green', '95%', 's-red', '8%'), | ||
|      ('s-yellow', '85%', 's-yellow', '70%'), |      ('s-yellow', '85%', 's-yellow', '70%'), | ||
|      ('s-green', '95%', 's- |      ('s-green', '95%', 's-green', '95%')   | ||
|   ] |   ] | ||
|   for (style1, col1, style2, col2) in  |   for (style1, col1, style2, col2) in style1_col1_style2_col2: | ||
|     print('<tr><td class="%s">%s</td><td class="% |     print('<tr><td class="%s">%s</td><td class="%s">%s</td></tr>', style1, col1, style2, col2) | ||
| = Ver também = | = Ver também = | ||
Latest revision as of 14:29, 28 December 2017
Example - Interact over a list of sets.
style1_col1_style2_col2 = [
   ('s-green', '95%', 's-red', '8%'),
   ('s-yellow', '85%', 's-yellow', '70%'),
   ('s-green', '95%', 's-green', '95%') 
]
for (style1, col1, style2, col2) in style1_col1_style2_col2:
print('%s%s', style1, col1, style2, col2)
Ver também
- NodeJs: Instalando o NodeJs no Linux
- MongoDB: Instalando o MongoDB no Linux
- Nginx: Instalando o Nginx no Linux
