list indices must be integers or slices, not str
Mats Wichmann
mats at wichmann.us
Wed Jul 20 12:46:35 EDT 2022
On 7/20/22 05:04, Frank Millman wrote:
> I think the preferred style these days is f'{x[-1]}' which works."
>
> Unfortunately the 'f' option does not work for me in this case, as I am
> using a string object, not a string literal.
For that you could consider
https://pypi.org/project/f-yeah/
(straying a bit off thread subject by now, admittedly)
More information about the Python-list
mailing list