Skip to content Skip to sidebar Skip to footer
Showing posts with the label F String

Constructing An F-string By For-looping Through A List

I'd like to know how to go from this: mylist = [10, 20, 30] to this: 'Quantity 10, quantit… Read more Constructing An F-string By For-looping Through A List

Trying To Understand Some F-string Magic (formatting Mini Language In F-strings)

In a comment on this post, somebody dropped this line of code: print('\n'.join(f'{a:{a}… Read more Trying To Understand Some F-string Magic (formatting Mini Language In F-strings)

Syntaxerror When Using Literal String Interpolation Or F-strings

Trying to read a csv file and print contents: with open('C:\test.csv') as csvfile: csv_… Read more Syntaxerror When Using Literal String Interpolation Or F-strings