> For the complete documentation index, see [llms.txt](https://squid22.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://squid22.gitbook.io/notes/python/using-fstrings-python3.md).

# Using fstrings Python3

Examples of using fstrings in Python3 as opposed to use %s or .format()

```python
ip = '10.10.10.15'
example = f'The IP Address is {ip}'
The Ip Address is 10.10.10.15

# Calculations
print(f'The result of 4 times 10 is {4 * 10}')
40

# Formatting
pi = 3.14159265359
print(f'Pi is {pi:.2f}')
3.14

```
