{"id":5861,"date":"2025-03-28T15:34:15","date_gmt":"2025-03-28T06:34:15","guid":{"rendered":"https:\/\/yorozu.cloudfree.jp\/wordpress\/?p=5861"},"modified":"2025-03-28T15:41:23","modified_gmt":"2025-03-28T06:41:23","slug":"5861","status":"publish","type":"post","link":"https:\/\/yorozu.cloudfree.jp\/wordpress\/?p=5861","title":{"rendered":"\u7df4\u7fd2\u554f\u984c\uff0836\u301c40\uff09"},"content":{"rendered":"\n<p>\u5b9f\u884c\u4f8b\u306f\u300cstupa.sarnath\u300d\u306e\u300cGoogle Colabotry\u300d\u74b0\u5883\u306b\u4fdd\u5b58\u3057\u3066\u3042\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>&quot;&quot;&quot;\n\n36. \u5dee\u96c6\u5408\n\u5909\u6570set1\u306b\u96c6\u5408{1,2,3,4,5}\uff0c\u5909\u6570set2\u306b\u96c6\u5408{3,4,5,6,7}\u3092\u4ee3\u5165\u3057\uff0c\u5dee\u96c6\u5408\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\u671f\u5f85\u3059\u308b\u51fa\u529b\uff1a{1,2}\n\n37. \u578b\u306e\u78ba\u8a8d\n3\u3064\u306e\u5909\u6570\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4ee3\u5165\u3057\u305f\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\uff0e\u5404\u5909\u6570\u306e\u578b\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\u51fa\u529b\u5f62\u5f0f\u306f\u554f\u3044\u307e\u305b\u3093\uff0e\n\ndata1 = {&#39;A&#39;:1, &#39;B&#39;:2}\ndata2 = &quot;hoge&quot;\ndata3 = {1,2,3,4,5}\n\u671f\u5f85\u3059\u308b\u51fa\u529b\uff1a&lt;class &#39;dict&#39;&gt; &lt;class &#39;str&#39;&gt; &lt;class &#39;set&#39;&gt;\n\n38. strip\n\u6587\u5b57\u5217&#39;This is sentence .\\n&#39;\u306e\u6539\u884c\u8a18\u53f7\u3092\u6d88\u3057\u305f\u3082\u306e\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\u671f\u5f85\u3059\u308b\u51fa\u529b\uff1aThis is sentence .\n\n39. split\n\u5909\u6570\u306b\u6587\u5b57\u5217&#39;C C++ \/\/ python java&#39;\u3092\u4ee3\u5165\u3057\uff0c\u3053\u306e\u6587\u5b57\u5217\u3092\u7a7a\u767d\u3067\u533a\u5207\u3063\u305f\u5f8c\u306e\u30ea\u30b9\u30c8\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0c\u307e\u305f\uff0c\u540c\u3058\u3053\u3068\u3092&#39;\/&#39;\u3067\u3082\u884c\u3044\uff0c\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\u671f\u5f85\u3059\u308b\u51fa\u529b\uff1a[&#39;C&#39;, &#39;C++&#39;, &#39;\/\/&#39;, &#39;python&#39;, &#39;java&#39;],[&#39;C C++ &#39;, &#39;&#39;, &#39; python java&#39;]\n\n40. join\n\u5909\u6570\u306b\u30ea\u30b9\u30c8[&#39;This&#39;, &#39;is&#39;, &#39;a&#39;, &#39;sentence&#39;]\u3092\u4ee3\u5165\u3057\uff0c\u3053\u308c\u3089\u3092\u7a7a\u767d\u533a\u5207\u3067\u7d50\u5408\u3057\u305f\u6587\u5b57\u5217\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\n\n\u671f\u5f85\u3059\u308b\u51fa\u529b\uff1aThis is a sentence\n\n&quot;&quot;&quot;\n#\n#\n#36. \u5dee\u96c6\u5408\n#\nprint(&quot;36. \u5dee\u96c6\u5408&quot;)\nx = {1,2,3,4,5}\ny = {3,4,5,6,7}\nprint(x - y)\n#\n#37. \u578b\u306e\u78ba\u8a8d\n#\nprint(&quot;37. \u578b\u306e\u78ba\u8a8d&quot;)\ndata1 = {&#39;A&#39;:1, &#39;B&#39;:2}\ndata2 = &quot;hoge&quot;\ndata3 = {1,2,3,4,5}\nprint(type(data1),type(data2),type(data3))  #\u6b63\u89e3\n&quot;&quot;&quot;\n#\n#  str\u3000\u3000\u3000\u3000\u6587\u5b57\u5217\n#  int\u3000\u3000\u3000\u3000\u6574\u6570\n#  float\u3000\u3000\u3000\u6d6e\u52d5\u5c0f\u6570\u70b9\n#  bool\u3000\u3000\u3000 \u30d6\u30fc\u30eb\uff08truem,false)\n#\u3000datetime\u3000 \u65e5\u4ed8\n#\u3000list\u3000\u3000\u3000\u3000\u914d\u5217    [ ]\n#\u3000tuple\u3000\u3000\u3000 \u30bf\u30d7\u30eb  ( )\n#  dictionry  \u8f9e\u66f8    { }\n#  set\u3000\u3000\u3000\u3000 \u96c6\u5408    { }\n&quot;&quot;&quot;\n#\n#38. strip\n#\nprint(&quot;38. strip&quot;)\nx = &#39;This is sentence .\\n&#39;\nprint(x.rstrip())    #\u6b63\u89e3\n#\n#39. split\n#\nprint(&quot;39. split&quot;)\nx = &#39;C C++ \/\/ python java&#39;\nprint(x.split( ))\nprint(x.split(&#39;\/&#39;))   #\u6b63\u89e3\n#\n#40. join\n#\nprint(&quot;40. join&quot;)\nx = [&#39;This&#39;, &#39;is&#39;, &#39;a&#39;, &#39;sentence&#39;]\nprint(&#39; &#39;.join(x))    #\u6b63\u89e3\n<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30fbPython\u5b66\u7fd2\uff08\uff15\uff15\u672c\u30ce\u30c3\u30af\uff09\u306b\u3064\u3044\u3066<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[17],"class_list":["post-5861","post","type-post","status-publish","format-standard","hentry","category-99_","tag-python"],"_links":{"self":[{"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5861"}],"version-history":[{"count":4,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5861\/revisions"}],"predecessor-version":[{"id":5866,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5861\/revisions\/5866"}],"wp:attachment":[{"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yorozu.cloudfree.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}