List comprehension with rsplit, invalid syntax
我有一个列表,由
1 | [f'{aggr}({var}) as {var.rsplit('.',1)[1]}_{aggr}' for var in variables] |
其中,
1 | [f'{aggr}({var}) as {var}_{aggr}' for var in variables] |
号
它起作用了。我该怎么修?
别把绳子弄断了。
1 | f'{aggr}({var}) as {var.rsplit(".",1)[1]}_{aggr}' |