0

I keep getting the below syntax error when trying to use fstring in a DataBricks Python notebook.

What am I missing?

Cell:

%python

test = 'yay'
f'This works, {test}!'

Results: SyntaxError: invalid syntax

enter image description here

Running this same code in a Jupyter notebook returns just fine. enter image description here

EDIT 1:

%python

import sys

sys.version

'3.5.2 (default, Nov 12 2018, 13:43:14) \n[GCC 5.4.0 20160609]'
ericOnline
  • 1,586
  • 1
  • 19
  • 54

0 Answers0