Flubbed it in the second interation through the string: range error... HOW?
Cameron Simpson
cs at cskk.id.au
Wed May 29 01:52:47 EDT 2024
On 29May2024 01:14, Thomas Passin <list1 at tompassin.net> wrote:
>Also, it's 2024 ... time to start using f-strings (because they are
>more readable than str.format())
By which Thomas means stuff like this:
print(f'if block {name[index]} and index {index}')
Notice the leading "f'". Personally I wouldn't even go that far, just:
print('if block', name[index], 'and index', index)
But there are plenty of places where f-strings are very useful.
More information about the Python-list
mailing list