An open API service indexing awesome lists of open source software.

https://github.com/jonathanmccormickjr/test-f-string-with-variable-and-value


https://github.com/jonathanmccormickjr/test-f-string-with-variable-and-value

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        

# test-f-string-with-variable-and-value

``` python
variable = 17

print(f"{variable=}") # This is more space-efficient
print(f"variable={variable}")
```

Output:

```
variable=17
variable=17
```

Both print statements work, but one has a neat shortcut where we can insert the variable and the value it represents all at once.