[Python] f-strings
String formatting의 방법 중 하나인 f-strings는 python 3.6부터 사용할 수 있는 기능입니다. 혹시 아직도 % 혹은 format을 사용하고 있으시면 f-strings로 바꿔보시는 걸 추천드립니다. 기본 사용법 >>> test_str = 'hello' >>> print(f'Test string is {test_str}') Test string is hello >>> print(f'{test_str=}') test_str='hello' # Print repr >>> print(f'{test_str}') 'hello' # Print Ascii >>> smile_face = '😀' >>> print(f'{smile_face}') '\U0001f600' >>> test_int = 123..
Development/Python
2022. 7. 3. 09:36
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Binary
- AWS
- Kubernetes
- LLM
- palindrome
- Git
- kubens
- collator
- Gemma
- Python
- BASIC
- 한빛미디어
- csv
- feed-forward
- Algorithm
- 책리뷰
- Shell
- docker
- Container
- error
- leetcode
- book
- K8S
- go
- Fine-Tuning
- 파이썬
- lllm
- kubernetes context
- 나는리뷰어다
- 키보드
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
글 보관함
반응형