{"id":156,"date":"2025-10-10T09:29:55","date_gmt":"2025-10-10T01:29:55","guid":{"rendered":"http:\/\/www.pyteam.cn\/?p=156"},"modified":"2025-10-10T10:12:58","modified_gmt":"2025-10-10T02:12:58","slug":"%e4%b8%aa%e6%80%a7%e5%8c%96%e9%97%ae%e5%80%99-1-4","status":"publish","type":"post","link":"http:\/\/www.pyteam.cn\/index.php\/2025\/10\/10\/%e4%b8%aa%e6%80%a7%e5%8c%96%e9%97%ae%e5%80%99-1-4\/","title":{"rendered":"\u4e2a\u6027\u5316\u95ee\u5019 1.4"},"content":{"rendered":"\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:clamp(18px, 1.125rem, 27px);font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#90A4AE;--cbp-line-number-width:calc(1 * 0.6 * 1.125rem);line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#ededed;color:#8198a3\">Python<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#90A4AE;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># \u793a\u4f8b\u4ee3\u7801\nstudent_name = \"\u5f20\u4f1f\"  # \u5b66\u751f\u53ef\u4ee5\u4fee\u6539\u4e3a\u81ea\u5df1\u7684\u540d\u5b57\ngreeting = f\"\u4f60\u597d\uff0c{student_name}\uff01\u6b22\u8fce\u6765\u5230Python\u4e16\u754c\uff01\"\nprint(greeting)\n\n# \u8f93\u51fa\u7ed3\u679c\uff1a\u4f60\u597d\uff0c\u5f20\u4f1f\uff01\u6b22\u8fce\u6765\u5230Python\u4e16\u754c\uff01<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-lighter\" style=\"background-color: #FAFAFA\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #90A4AE; font-style: italic\"># \u793a\u4f8b\u4ee3\u7801<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">student_name <\/span><span style=\"color: #39ADB5\">=<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #39ADB5\">&quot;<\/span><span style=\"color: #91B859\">\u5f20\u4f1f<\/span><span style=\"color: #39ADB5\">&quot;<\/span><span style=\"color: #90A4AE\">  <\/span><span style=\"color: #90A4AE; font-style: italic\"># \u5b66\u751f\u53ef\u4ee5\u4fee\u6539\u4e3a\u81ea\u5df1\u7684\u540d\u5b57<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">greeting <\/span><span style=\"color: #39ADB5\">=<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #9C3EDA\">f<\/span><span style=\"color: #91B859\">&quot;\u4f60\u597d\uff0c<\/span><span style=\"color: #F76D47\">{<\/span><span style=\"color: #90A4AE\">student_name<\/span><span style=\"color: #F76D47\">}<\/span><span style=\"color: #91B859\">\uff01\u6b22\u8fce\u6765\u5230Python\u4e16\u754c\uff01&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6182B8\">print<\/span><span style=\"color: #39ADB5\">(<\/span><span style=\"color: #6182B8\">greeting<\/span><span style=\"color: #39ADB5\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE; font-style: italic\"># \u8f93\u51fa\u7ed3\u679c\uff1a\u4f60\u597d\uff0c\u5f20\u4f1f\uff01\u6b22\u8fce\u6765\u5230Python\u4e16\u754c\uff01<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":76,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5"],"views":158,"_links":{"self":[{"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/posts\/156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":1,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":157,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/posts\/156\/revisions\/157"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/media\/76"}],"wp:attachment":[{"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pyteam.cn\/index.php\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}