Get error when try to put string-funcs in f-string

26 views Asked by At
a = 'guindo , barwos, zasport'
a
guindo , barwos, zasport

But when I write

print(f'find is {a.find('a')}')

I get error

SyntaxError: f-string: unmatched '('

Why? Can someone please write right code that will be work. Thanks.

1

There are 1 answers

0
hata On

Try this:

print(f"find is {a.find('a')}")