![]() | 1 | initial version |
If v
is in R
then you can use e.g. the condition v[:3] == '$a_'
to check that the first three characters in v
are $a_
.
sage: [v for v in R if v[:3] == '$a_']
['$a_{3}$', '$a_{5}$']
![]() | 2 | No.2 Revision |
If v
is in R
then you can use e.g. the condition v[:3] == '$a_'
to check that the first three characters in v
are $a_
.
sage: [v for v in R if v[:3] == '$a_']
['$a_{3}$', '$a_{5}$']
sage: for v in R:
....: if v[:3] == '$a_':
....: print(v)
....:
$a_{3}$
$a_{5}$