I'm trying to understand how this answer on Code Golf works, turning integers into french licence plates with the following code:
lambda n:f"%c%c-{n%1000:03}-%c%c"%(*(65+n//1000//26**i%26for i in[3,2,1,0]),)
I understand '%c' with 65 + n on a % 26 number to get the letters, and I understand % 1000 : 03 for getting 3-0 padded numbers up to 999. However I can't find anything on the following:
- the use of two forward slashes here
- the effect of the
{ }brackets in the string
Explanations would be much appreciated - thanks!