---
title: "Discussion on \"Python - f string tricks\" | Hashnode"
description: "Discussion on \"Python - f string tricks\". Sử dụng lại tên biến\nstr_value = \"hello，python coders\"\nprint(f\"{ str_value = }\")\n# str_value = 'hello，python coders'\n\nThay đổi output\nnum_value = 125\nprint(f\"{num_value % 2 = }\")\n# num_value % 2 = 1\n\nThay đổi date\nimport datetime\n\ntoday = datetime.da..."
url: "https://hashnode.com/posts/python-f-string-tricks/6445ce3d835b42ab9ab1cd4c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Python - f string tricks](https://caoluc.hashnode.dev/python-f-string-tricks?utm_source=hashnode&utm_medium=feed)

Sử dụng lại tên biến str\_value = "hello，python coders" print(f"{ str\_value = }") # str\_value = 'hello，python coders' Thay đổi output num\_value = 125 print(f"{num\_value % 2 = }") # num\_value % 2 = 1 Thay đổi date import datetime today = datetime.da...

Apr 24, 2023 · 2 min read · caoluc.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#string](https://hashnode.com/tag/string)
-   [#devops](https://hashnode.com/tag/devops)

## Written by

[Luc Cao](https://hashnode.com/@caolucl)

@caolucl

  
[View profile](https://hashnode.com/@caolucl)

Technie

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
