| 1 | initial version |
Something like this:
x = [i^2 for i in range(20)] # for testing purposes
for i in range(1, 11):
show(LatexExpr(fr"\text{{The variable }} x_{{{i}}} \text{{ takes the value :}}"), x[i])
| 2 | No.2 Revision |
Something like this:
x = [i^2 for i in range(20)] # for testing purposes
for i in range(1, 11):
show(LatexExpr(fr"\text{{The variable }} x_{{{i}}} \text{{ takes the value :}}"), :}}"),
x[i])
Python formatted strings or f-strings can include things in {}.
Escaping that inclusion mechanism to get actual braces is done using {{}}.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.