Using = as suffix to variables in f-strings

Viewed 13

Consider the following code :

data='a,b,c'  
print(f'{data=}') 

The output for this is data='a,b,c'
What I do understand is that any variable put inside curly braces in the f-string will be replaced with its value. so print(f'{data}') outputs a,b,c which makes sense. But what exactly is happening here {data=}?

0 Answers
Related