{"id":1257,"date":"2019-04-06T22:03:17","date_gmt":"2019-04-06T13:03:17","guid":{"rendered":"https:\/\/blog.minatoproject.com\/?p=1257"},"modified":"2020-02-07T22:32:28","modified_gmt":"2020-02-07T13:32:28","slug":"%e3%80%90python%e3%80%91f-strings","status":"publish","type":"post","link":"https:\/\/blog.minatoproject.com\/?p=1257","title":{"rendered":"\u3010Python\u3011f-strings"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch-1024x576.png\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch-1024x576.png 1024w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch-300x169.png 300w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch-768x432.png 768w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch-320x180.png 320w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div>\n<p class=\"wp-block-paragraph\">\u3053\u308c\u307e\u3067Python\u3067\u6587\u5b57\u5217\u306b\u5909\u6570\u3092\u57cb\u3081\u8fbc\u3080\u6642\u306f <code>str.format()<\/code> \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001Python 3.6\u3088\u308a <code>f-strings<\/code> \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\u3002\u4ee5\u4e0b\u5099\u5fd8\u9332\u307e\u3067\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-\"><code>&gt;&gt;&gt; x = 123\n&gt;&gt;&gt; print(f&quot;x is {x}&quot;)\nx is 123\n&gt;&gt;&gt; y = 123456789\n&gt;&gt;&gt; print(f&quot;y is {y:,}&quot;)\ny is 123,456,789<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u307e\u3067Python\u3067\u6587\u5b57\u5217\u306b\u5909\u6570\u3092\u57cb\u3081\u8fbc\u3080\u6642\u306f str.format() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001Python 3.6\u3088\u308a f-strings \u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\u3002\u4ee5\u4e0b\u5099\u5fd8\u9332\u307e\u3067\u3002<\/p>\n","protected":false},"author":1,"featured_media":1621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","vkExUnit_EyeCatch_disable":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_lightning_design_setting":[],"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"minato\"\/>\n\t<meta name=\"google-site-verification\" content=\"UUjduCY_ZNcQEzPURjRy7yvqSwwNBwoD3aPYPW31TnM\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/blog.minatoproject.com\/?p=1257\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"minato project\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\u3010Python\u3011f-strings | minato project\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/blog.minatoproject.com\/?p=1257\" \/>\n\t\t<meta property=\"fb:app_id\" content=\"532831333820969\" \/>\n\t\t<meta property=\"fb:admins\" content=\"100023392422029\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-04-06T13:03:17+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-07T13:32:28+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@icecreamlegjob\" \/>\n\t\t<meta name=\"twitter:title\" content=\"\u3010Python\u3011f-strings | minato project\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#article\",\"name\":\"\\u3010Python\\u3011f-strings | minato project\",\"headline\":\"\\u3010Python\\u3011f-strings\",\"author\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/blog.minatoproject.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/20190406_eyecatch.png\",\"width\":1280,\"height\":720},\"datePublished\":\"2019-04-06T22:03:17+09:00\",\"dateModified\":\"2020-02-07T22:32:28+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#webpage\"},\"articleSection\":\"Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com#listItem\",\"position\":1,\"name\":\"\\u30db\\u30fc\\u30e0\",\"item\":\"https:\\\/\\\/blog.minatoproject.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?cat=6#listItem\",\"name\":\"Python\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?cat=6#listItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\\\/\\\/blog.minatoproject.com\\\/?cat=6\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#listItem\",\"name\":\"\\u3010Python\\u3011f-strings\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com#listItem\",\"name\":\"\\u30db\\u30fc\\u30e0\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#listItem\",\"position\":3,\"name\":\"\\u3010Python\\u3011f-strings\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?cat=6#listItem\",\"name\":\"Python\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/#person\",\"name\":\"minato\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c7aa1ea41f01c286e646af94a932291edf8b30d48953e798bcf19dacefbf821?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"minato\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?author=1#author\",\"url\":\"https:\\\/\\\/blog.minatoproject.com\\\/?author=1\",\"name\":\"minato\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2c7aa1ea41f01c286e646af94a932291edf8b30d48953e798bcf19dacefbf821?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"minato\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#webpage\",\"url\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257\",\"name\":\"\\u3010Python\\u3011f-strings | minato project\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?author=1#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/blog.minatoproject.com\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/20190406_eyecatch.png\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257\\\/#mainImage\",\"width\":1280,\"height\":720},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/?p=1257#mainImage\"},\"datePublished\":\"2019-04-06T22:03:17+09:00\",\"dateModified\":\"2020-02-07T22:32:28+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.minatoproject.com\\\/\",\"name\":\"minato project\",\"description\":\"\\u30a2\\u30cb\\u30e1\\u597d\\u304d\\u306e\\u30b7\\u30b9\\u30c6\\u30e0\\u30a8\\u30f3\\u30b8\\u30cb\\u30a2\\u304c\\u5f92\\u7136\\u306a\\u308b\\u307e\\u307e\\u306b\\u81ea\\u5206\\u8a9e\\u308a\\u3059\\u308b\\u3060\\u3051\\u306e\\u30d6\\u30ed\\u30b0\\u3067\\u3059\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.minatoproject.com\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u3010Python\u3011f-strings | minato project","description":"","canonical_url":"https:\/\/blog.minatoproject.com\/?p=1257","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"UUjduCY_ZNcQEzPURjRy7yvqSwwNBwoD3aPYPW31TnM","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.minatoproject.com\/?p=1257#article","name":"\u3010Python\u3011f-strings | minato project","headline":"\u3010Python\u3011f-strings","author":{"@id":"https:\/\/blog.minatoproject.com\/?author=1#author"},"publisher":{"@id":"https:\/\/blog.minatoproject.com\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png","width":1280,"height":720},"datePublished":"2019-04-06T22:03:17+09:00","dateModified":"2020-02-07T22:32:28+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/blog.minatoproject.com\/?p=1257#webpage"},"isPartOf":{"@id":"https:\/\/blog.minatoproject.com\/?p=1257#webpage"},"articleSection":"Python"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.minatoproject.com\/?p=1257#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com#listItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/blog.minatoproject.com","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com\/?cat=6#listItem","name":"Python"}},{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com\/?cat=6#listItem","position":2,"name":"Python","item":"https:\/\/blog.minatoproject.com\/?cat=6","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com\/?p=1257#listItem","name":"\u3010Python\u3011f-strings"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com#listItem","name":"\u30db\u30fc\u30e0"}},{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com\/?p=1257#listItem","position":3,"name":"\u3010Python\u3011f-strings","previousItem":{"@type":"ListItem","@id":"https:\/\/blog.minatoproject.com\/?cat=6#listItem","name":"Python"}}]},{"@type":"Person","@id":"https:\/\/blog.minatoproject.com\/#person","name":"minato","image":{"@type":"ImageObject","@id":"https:\/\/blog.minatoproject.com\/?p=1257#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/2c7aa1ea41f01c286e646af94a932291edf8b30d48953e798bcf19dacefbf821?s=96&d=mm&r=g","width":96,"height":96,"caption":"minato"}},{"@type":"Person","@id":"https:\/\/blog.minatoproject.com\/?author=1#author","url":"https:\/\/blog.minatoproject.com\/?author=1","name":"minato","image":{"@type":"ImageObject","@id":"https:\/\/blog.minatoproject.com\/?p=1257#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2c7aa1ea41f01c286e646af94a932291edf8b30d48953e798bcf19dacefbf821?s=96&d=mm&r=g","width":96,"height":96,"caption":"minato"}},{"@type":"WebPage","@id":"https:\/\/blog.minatoproject.com\/?p=1257#webpage","url":"https:\/\/blog.minatoproject.com\/?p=1257","name":"\u3010Python\u3011f-strings | minato project","inLanguage":"ja","isPartOf":{"@id":"https:\/\/blog.minatoproject.com\/#website"},"breadcrumb":{"@id":"https:\/\/blog.minatoproject.com\/?p=1257#breadcrumblist"},"author":{"@id":"https:\/\/blog.minatoproject.com\/?author=1#author"},"creator":{"@id":"https:\/\/blog.minatoproject.com\/?author=1#author"},"image":{"@type":"ImageObject","url":"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png","@id":"https:\/\/blog.minatoproject.com\/?p=1257\/#mainImage","width":1280,"height":720},"primaryImageOfPage":{"@id":"https:\/\/blog.minatoproject.com\/?p=1257#mainImage"},"datePublished":"2019-04-06T22:03:17+09:00","dateModified":"2020-02-07T22:32:28+09:00"},{"@type":"WebSite","@id":"https:\/\/blog.minatoproject.com\/#website","url":"https:\/\/blog.minatoproject.com\/","name":"minato project","description":"\u30a2\u30cb\u30e1\u597d\u304d\u306e\u30b7\u30b9\u30c6\u30e0\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u5f92\u7136\u306a\u308b\u307e\u307e\u306b\u81ea\u5206\u8a9e\u308a\u3059\u308b\u3060\u3051\u306e\u30d6\u30ed\u30b0\u3067\u3059","inLanguage":"ja","publisher":{"@id":"https:\/\/blog.minatoproject.com\/#person"}}]},"og:locale":"ja_JP","og:site_name":"minato project","og:type":"article","og:title":"\u3010Python\u3011f-strings | minato project","og:url":"https:\/\/blog.minatoproject.com\/?p=1257","fb:app_id":"532831333820969","fb:admins":"100023392422029","og:image":"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png","og:image:secure_url":"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png","og:image:width":1280,"og:image:height":720,"article:published_time":"2019-04-06T13:03:17+00:00","article:modified_time":"2020-02-07T13:32:28+00:00","twitter:card":"summary","twitter:site":"@icecreamlegjob","twitter:title":"\u3010Python\u3011f-strings | minato project","twitter:image":"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/04\/20190406_eyecatch.png"},"aioseo_meta_data":{"post_id":"1257","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"article","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-30 04:43:04","updated":"2022-10-16 09:31:42","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.minatoproject.com\" title=\"\u30db\u30fc\u30e0\">\u30db\u30fc\u30e0<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\/<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.minatoproject.com\/?cat=6\" title=\"Python\">Python<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\/<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u3010Python\u3011f-strings\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u30db\u30fc\u30e0","link":"https:\/\/blog.minatoproject.com"},{"label":"Python","link":"https:\/\/blog.minatoproject.com\/?cat=6"},{"label":"\u3010Python\u3011f-strings","link":"https:\/\/blog.minatoproject.com\/?p=1257"}],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1257"}],"version-history":[{"count":3,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1257\/revisions"}],"predecessor-version":[{"id":1777,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1257\/revisions\/1777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/media\/1621"}],"wp:attachment":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}