본문 바로가기

조용한 담장

검색하기
조용한 담장
프로필사진 iosroid

  • 분류 전체보기 (125)
    • Flutter (43)
    • tips (10)
    • Dart (14)
    • Interesthing (6)
    • python (6)
    • kotlin (40)
    • Blogs I read this week (3)
    • Yocto (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
Tags
  • 웹크롤러
  • 콜렉션
  • texttheme
  • ML
  • 함수
  • map
  • 크롤러
  • text
  • animation
  • 코틀린
  • set
  • 파이썬
  • Collection
  • 클래스
  • DART
  • kotlin
  • List
  • variable
  • pushnamed
  • import
  • package
  • function
  • 다트
  • Class
  • textstyle
  • crawler
  • python
  • Android
  • 플러터
  • Flutter
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록문자열 (1)

조용한 담장

Python: f-String (Literal String Interpolation)

python 3.6 이후에는 f-String 을 쓰면 좋다. 이전엔 % format >>> world = "world" >>> "Hi, %s!" % world 'Hi, world!' >>> new = "new" >>> "Hi, %s %s!" % (new, world) 'Hi, new world!' 문자열과 변수가 따로 놀아 한눈에 안들어온다. 변수가 많아지면 더 복잡해진다. str.format() >>> "Hi, {} {}".format(new, world) 'Hi, new world' >>> "Hi, {1} {0}".format(new, world) 'Hi, world new' 여전히 따로 놀아서 보기 어렵다. >>> "Hi, {string1} ..

python 2020. 4. 28. 18:23
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바