0

I remember having seen that direct substitution like the below should be possible:

py = 'Python'
print(f'Hello {py}')

With the purpose to get:

Hello Python

But I can't make it work, or maybe I just use an Python 3 that is not new enough.

What is the syntax and what Python version supports direct substitution?

Tom Burrows
  • 2,225
  • 2
  • 29
  • 46
EquipDev
  • 5,573
  • 10
  • 37
  • 63

0 Answers0