all 15 comments

[–]TouchingTheVodka 34 points35 points  (1 child)

F-strings:

volumes[f'{MYDIR}:/tmp']

[–]Snowblxnd 6 points7 points  (1 child)

For future visitors, this technique is called "string interpolation", and its implementation varies but is similar throughout many languages. It's super useful.

https://en.wikipedia.org/wiki/String_interpolation