{"id":145,"date":"2018-07-31T11:16:32","date_gmt":"2018-07-31T02:16:32","guid":{"rendered":"https:\/\/python-introduction.com\/?p=145"},"modified":"2018-08-02T21:15:15","modified_gmt":"2018-08-02T12:15:15","slug":"python%e3%81%ae%e5%a4%89%e6%95%b0%e5%ae%a3%e8%a8%80%e3%81%a7%e6%b3%a8%e6%84%8f%e3%81%99%e3%81%b9%e3%81%8d%e3%81%93%e3%81%a8","status":"publish","type":"post","link":"https:\/\/python-introduction.com\/?p=145","title":{"rendered":"Python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u6ce8\u610f\u3059\u3079\u304d\u3053\u3068"},"content":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u3067\u306fPythonn\u306e\u5909\u6570\u5ba3\u8a00\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306fPycharm\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u65b9\u306f<br \/>\n\u30b3\u30c1\u30e9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"linkcard\"><table border=\"1\" cellspacing=\"0\" cellpadding=\"4\"><tbody><\/tr><tr><td>\u4eca\u56de\u306fwindows10\u306bPycharm\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u3061\u306a\u307f\u306bPycharm\u306f\u300e\u30d1\u30a4\u30c1\u30e3\u30fc\u30e0\u300f\u3068\u8aad\u307f\u307e\u3059\u3002\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001 Anaconda Prompt\u304b\u3089python\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u305f\u306d\u3002\u3067\u3082\u3001Pycharm\u304b\u3089Python\u3092\u5b9f\u884c\u3057\u305f\u307b\u3046\u304c\u3084\u308a\u3084\u3059\u3044\u3067\u3059\u3002\u306a\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3067...<br><a class=\"no_icon\" href=\"https:\/\/python-introduction.com\/?p=71\">Pycharm\u3092windows10\u306b\u7121\u6599\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5<\/a> - python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0<\/td><\/tr><\/tbody><\/table><\/div>\n<p>Pycharm\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u65b9\u306f\u3053\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n<div class=\"linkcard\"><table border=\"1\" cellspacing=\"0\" cellpadding=\"4\"><tbody><\/tr><tr><td>\u4eca\u56de\u306fPycharm\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u3067\u3001Pycharm\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u65b9\u306f\u30b3\u30c1\u30e9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306fPycharm\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u306b\u89e3\u8aac\u3092\u3059\u3059\u3081\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002Pycharm\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u305d\u306e1.python\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c...<br><a class=\"no_icon\" href=\"https:\/\/python-introduction.com\/?p=100\">\u3010python\u5165\u9580\u3011pycharm\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/a> - python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0<\/td><\/tr><\/tbody><\/table><\/div><\/p>\n<p>\u307e\u305a\u4ee5\u4e0b\u3092\u5165\u529b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'\r\nprint(num)\r\nprint(name)<\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/detanokotae730.jpg\" alt=\"python \u5909\u6570\u5ba3\u8a00\" width=\"600\" height=\"330\" class=\"alignnone size-full wp-image-151\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/detanokotae730.jpg 600w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/detanokotae730-300x165.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b\u5909\u6570\u3068\u306f<br \/>\n\u4e0a\u8a18\u306ename\u3084num\u307f\u305f\u3044\u306a\u6587\u5b57\u3092\u4f7f\u3063\u3066<br \/>\n\u305d\u306e\u4e2d\u306b\u4e00\u5b9a\u671f\u9593\u30c7\u30fc\u30bf\u3092\u8a18\u61b6\u3055\u305b\u308b\u3088\u3046\u306b\u3057\u305f\u3082\u306e\u3092\u3044\u3044\u307e\u3059\u3002<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#Python\"><span class=\"toc_number toc_depth_1\">1<\/span> Python\u3067\u3088\u304f\u4f7f\u3046\u5909\u6570\u5ba3\u8a00\u3068\u306f\uff1f<\/a><\/li><li><a href=\"#Python-2\"><span class=\"toc_number toc_depth_1\">2<\/span> Python\u72ec\u7279\u306e\u5909\u6570\u5ba3\u8a00\u3068\u306f\uff1f<\/a><\/li><li><a href=\"#pythonintstr\"><span class=\"toc_number toc_depth_1\">3<\/span> python\u5909\u6570\u5ba3\u8a00\u3067\u77e5\u3063\u3066\u304a\u304f\u3079\u304dint\u578b\u3068str\u578b\u3068\u306f\uff1f<\/a><\/li><li><a href=\"#python\"><span class=\"toc_number toc_depth_1\">4<\/span> python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u554f\u984c\u3092\u3060\u3057\u307e\u3059<\/a><\/li><li><a href=\"#python-2\"><span class=\"toc_number toc_depth_1\">5<\/span> python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u3088\u304f\u4f7f\u3046\u578b\u5909\u63db\u3068\u306f\uff1f<\/a><\/li><li><a href=\"#python-3\"><span class=\"toc_number toc_depth_1\">6<\/span> python\u5909\u6570\u5ba3\u8a00\u306e\u6ce8\u610f\u70b9<\/a><\/li><li><a href=\"#python-4\"><span class=\"toc_number toc_depth_1\">7<\/span> python\u5909\u6570\u5ba3\u8a00\u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Python\">Python\u3067\u3088\u304f\u4f7f\u3046\u5909\u6570\u5ba3\u8a00\u3068\u306f\uff1f<\/span><\/h2>\n<p>Python\u3067\u3088\u304f\u4f7f\u3046\u5909\u6570\u5ba3\u8a00\u3068\u306f\u5909\u6570\u3092\u4f5c\u308b\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'\r\nprint(num)\r\nprint(name)<\/pre>\n<p>\u3067\u3044\u3046\u3068\u3053\u308d\u306e<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'<\/pre>\n<p>\u306e\u90e8\u5206\u3002<\/p>\n<p>\u5909\u6570\u3092\u4f5c\u3063\u3066\u3044\u308b\u306e\u3067\u5909\u6570\u5ba3\u8a00\u306b\u306a\u308a\u307e\u3059\u306d\u3002<\/p>\n<h2><span id=\"Python-2\">Python\u72ec\u7279\u306e\u5909\u6570\u5ba3\u8a00\u3068\u306f\uff1f<\/span><\/h2>\n<p>\u305f\u3068\u3048\u3070\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3060\u3063\u305f\u3089<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">var int = 91\r\nvar str name ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'<\/pre>\n<p>\u3068\u5909\u6570\u5ba3\u8a00\u3092\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3082<span class=\"marker_kpink\">Python\u306e\u5834\u5408\u306b\u306f\u3044\u3061\u3044\u3061\u300evar\u300f\u3068\u304b<br \/>\n\u300evar str\u300f\u3092\u4f7f\u3044\u307e\u305b\u3093<\/span>\u3002<\/p>\n<p>Python\u3060\u3063\u305f\u3089<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'<\/pre>\n<p>\u3067OK\u3067\u3059\u3002<\/p>\n<p>\u300evar\u300f\u3068\u304b\u300evar str\u300f\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082\u300enum\u300f\u3068\u304b\u300ename\u300f\u306a\u3069\u3067<br \/>\n\u5ba3\u8a00\u3057\u305f\u6642\u70b9\u3067Python\u306a\u3089\u81ea\u52d5\u7684\u306b\u8a8d\u8b58\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3088\u308a<br \/>\nPython\u306e\u307b\u3046\u304c\u4f7f\u3044\u52dd\u624b\u304c\u3088\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u3001Python\u3060\u3068\u81ea\u52d5\u3067int\u578b\u3068\u304bstr\u578b\u3068\u304b<br \/>\n\u8a8d\u8b58\u3057\u3066\u3044\u308b\u306e\u304b\u3069\u3046\u304b\u3001\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u5165\u529b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'\r\nprint(num, type(num))\r\nprint(name, type(name))<\/pre>\n<p>\u3059\u308b\u3068<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/pythonhakatteni730.jpg\" alt=\"python\u306f\u81ea\u52d5\u3067\u8a8d\u8b58\u3059\u308b\" width=\"600\" height=\"330\" class=\"alignnone size-full wp-image-157\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/pythonhakatteni730.jpg 600w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/pythonhakatteni730-300x165.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u4e0a\u8a18\u753b\u50cf\u306e\u8d64\u67a0\u5185\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067num\u306fint\u3067name\u306fstr\u3068\u81ea\u52d5\u7684\u306b<br \/>\n\u8a8d\u8b58\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u306d\u3002<br \/>\nPython\u306f\u5049\u3044\u3067\u3059\u306d\uff08\u82e6\u7b11\uff09<\/p>\n<p>\u3068\u306b\u304b\u304f\u3001Python\u3067\u4ed5\u4e8b\u3057\u3066\u3044\u3066<br \/>\n\u300c\u3053\u308c\u3001\u4f55\u578b\u304b\u306a\uff1f\u300d\u3068\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306b\u306f<br \/>\n\u4e0a\u8a18\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u3066\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">print(name, type(name))<\/pre>\n<p>\u4e0a\u8a18\u306etype\u306e\u90e8\u5206\u3092type\u95a2\u6570\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<h2><span id=\"pythonintstr\">python\u5909\u6570\u5ba3\u8a00\u3067\u77e5\u3063\u3066\u304a\u304f\u3079\u304dint\u578b\u3068str\u578b\u3068\u306f\uff1f<\/span><\/h2>\n<p>\u3055\u304d\u307b\u3069\u3001int\u3068\u304bstr\u3068\u3044\u3046\u6587\u5b57\u304c\u767b\u5834\u3057\u307e\u3057\u305f\u306d\u3002<br \/>\n\u3053\u308c\u306f\u305d\u308c\u305e\u308c\u3001int\u578b\u3001str\u578b\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p class=\"check08\">int\u578b\u3068\u306f\uff1f<\/p>\n<p>int\u578b\u306f\u5909\u6570\u306e\u4e00\u7a2e\u3067\u3059\u3002<br \/>\n\u3061\u306a\u307f\u306b\u5909\u6570\u3068\u306f\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u304a\u304f\u5bb9\u5668\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u5909\u6570\u3068\u3044\u3046\u5bb9\u5668\u306e\u4e2d\u306b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u304a\u304f\u308f\u3051\u3067\u3059\u304c<br \/>\nint\u578b\u306e\u5834\u5408\u306b\u306f\u3001\u6574\u6570\u3092\u5165\u308c\u308b\u3068\u3044\u3046\u30eb\u30fc\u30eb\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c\u3058\u3083\u3001\u6574\u6570\u3063\u3066\u4f55\uff1f\u300d\u3068\u3044\u3046\u65b9\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u6574\u6570\u3068\u306f\u30de\u30a4\u30ca\u30b9\u30820\u304a\u30d7\u30e9\u30b9\u3082\u542b\u3080\u3051\u3069\u3001\u5c0f\u6570\u3084\u5206\u6570\u306f\u542b\u307e\u306a\u3044\u6570\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u201515\u3068\u304b0\u3068\u304b20001\u306f\u6574\u6570\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082\u30013.5\u306f\u5c0f\u6570\u306a\u306e\u3067\u6574\u6570\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u306a\u306e\u3067int\u578b\u3068\u3044\u3046\u5909\u6570\u306e\u5bb9\u5668\u306b\u5165\u308c\u3089\u308c\u308b\u306e\u306f<br \/>\n\uff0d5\u3068\u304b0\u3068\u304b100\u3068\u3044\u3063\u305f\u6574\u6570\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p> \u3057\u305f\u304c\u3063\u3066\u5148\u307b\u3069\u306e<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91<\/pre>\n<p>\u306fint\u578b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span class=\"marker_kpink\">python\u3067\u306f\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u9055\u3063\u3066<br \/>\nint\u578b\u3068\u8a18\u8f09\u3057\u306a\u304f\u3066\u3082\u3001\u52dd\u624b\u306b\u8a8d\u8b58\u3057\u3066\u304f\u308c\u308b<\/span>\u3093\u3067\u3057\u305f\u306d\u3002<\/p>\n<p class=\"check08\">str\u578b\u3068\u306f\uff1f<\/p>\n<p>str\u578b\u306f\u6b63\u78ba\u306b\u306fString\u578b\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>int\u578b\u3068\u540c\u69d8\u3001\u5909\u6570\u306e\u4e00\u7a2e\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060str\u578b\u306e\u5834\u5408\u306b\u306f\u6574\u6570\u3067\u306f\u306a\u304f\u3066\u6587\u5b57\u3092\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>String\u578b\u3010\u5909\u6570\u306e\u578b\u3011\u3068\u306f<\/p>\n<p>\u5909\u6570\uff08\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u304a\u304f\u7bb1\uff09\u306e\u7a2e\u985e\u306e\u3072\u3068\u3064<br \/>\n\u3067\u3042\u308a<\/p>\n<p>\u300c\u305d\u306e\u7bb1\u306b\u306f\u6587\u5b57\u5217\uff08\u6587\u5b57\u306e\u96c6\u307e\u308a\uff09\u3092\u5165\u308c\u3066\u826f\u3044\u3088\u300d\u306a\u6c7a\u307e\u308a\u306e\u3053\u3068<br \/>\n\u3067\u3059\u3002 <\/p>\n<p>\u306a\u306e\u3067\u5148\u307b\u3069\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">name ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'<\/pre>\n<p>\u3068\u6587\u5b57\u3092\u5165\u308c\u305f\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3068\u306b\u304b\u304fpython\u306e\u5834\u5408\u306b\u306f\u52dd\u624b\u306b<br \/>\nstring\u578b\u3068\u8a8d\u8b58\u3057\u3066\u304f\u308c\u308b\u306e\u3067<br \/>\n\u697d\u3067\u3044\u3044\u3067\u3059\u306d\u3002<\/p>\n<h2><span id=\"python\">python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u554f\u984c\u3092\u3060\u3057\u307e\u3059<\/span><\/h2>\n<p>\u3053\u3053\u3067\u554f\u984c\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u3069\u3046\u8a8d\u8b58\u3055\u308c\u308b\u3067\u3057\u3087\u3046\uff1f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='Python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0'\r\n\r\nnum = name<\/pre>\n<p> \u3053\u3053\u306e\u90e8\u5206\u304c\u554f\u984c\u3067\u3059\u306d\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = name<\/pre>\n<p>\u7b54\u3048\u3068\u3057\u3066\u306f<br \/>\npython\u306e\u5834\u5408\u3001\u52dd\u624b\u306bstring\u578b\u3068\u8a8d\u8b58\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h2><span id=\"python-2\">python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u3088\u304f\u4f7f\u3046\u578b\u5909\u63db\u3068\u306f\uff1f<\/span><\/h2>\n<p>\u4ee5\u4e0b\u5165\u529b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='5963'\r\nnew_num = int(name)\r\nprint(new_num, type(new_num))<\/pre>\n<p>\u7d50\u679c\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/inthenka731.jpg\" alt=\"\u578b\u5909\u63db\" width=\"600\" height=\"330\" class=\"alignnone size-full wp-image-171\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/inthenka731.jpg 600w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/07\/inthenka731-300x165.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>new_num\u306fint\u578b\u30675963\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br \/>\n\u3064\u307e\u308a\u6574\u6570\u3068\u306a\u3063\u305f\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3067\u3082\u6700\u521d\u3001name\u3068\u3044\u3046\u5909\u6570\u306b\u5165\u308c\u305f\u3068\u304d\u306b\u306f<br \/>\n&#8216;5963&#8217;\u3068\u3084\u3063\u305f\u306e\u3067\u6587\u5b57\u5217\uff08string\u578b\uff09\u3060\u3063\u305f\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u308c\u304cint\u578b\u306b\u578b\u304c\u5909\u63db\u3055\u308c\u305f\u308f\u3051\u3067\u3059\u306d\u3002<br \/>\n\u3053\u3046\u3044\u3046\u306e\u3092\u578b\u5909\u63db\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u3069\u3046\u3057\u3066python\u3060\u3068\u3053\u3046\u3044\u3046\u3053\u3068\u3092\u3059\u308b\u306e\u3067\u3057\u3087\u3046\uff1f<\/p>\n<p>\u305f\u3068\u3048\u3070<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">print 91 + &quot;5963&quot;<\/pre>\n<p>\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u300191\u3068\u3044\u3046\u6574\u6570\u3068&#8221;5963&#8243;\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u304f\u3063\u3064\u3051\u308b\u3068<br \/>\n\u30bf\u30a4\u30d7\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u3093\u3067\u3059\u3002<\/p>\n<p>\u3060\u304b\u3089\u3055\u3063\u304d\u307f\u305f\u3044\u306a\u611f\u3058\u3067<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='5963'\r\nnew_num = int(name)\r\nprint(new_num, type(new_num))<\/pre>\n<p>\u3068\u578b\u5909\u63db\u3092\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span class=\"redb18\">python\u306f\u81ea\u52d5\u7684\u306b\u578b\u5909\u63db\u3092\u3057\u3066\u304f\u308c\u306a\u3044<\/span>\u3068\u3044\u3046\u3053\u3068\u3092<br \/>\n\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<h2><span id=\"python-3\">python\u5909\u6570\u5ba3\u8a00\u306e\u6ce8\u610f\u70b9<\/span><\/h2>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">1num = 91\r\nnum1 =91<\/pre>\n<p>python\u3067\u306f<\/p>\n<p>\u300e1num\u300f\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u6700\u521d\u306b\u6570\u5b57\u304c\u5165\u3063\u305f\u5909\u6570\u5ba3\u8a00\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u9006\u306b\u300enum1\u300f\u3068\u3044\u3063\u305f\u611f\u3058\u3067<br \/>\n\u6587\u5b57\u306e\u3042\u3068\u306b\u6570\u5b57\u3092\u5165\u308c\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">for = '\u3053\u3093\u306b\u3061\u306f'\r\nif = '\u3055\u3088\u3046\u306a\u3089'<\/pre>\n<p>python\u3067\u306f\u300eif\u300f\u3068\u304b\u300efor\u300f\u306f<br \/>\n\u3042\u3089\u304b\u3058\u3081\u7528\u9014\u304c\u6c7a\u307e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u5909\u6570\u5ba3\u8a00\u3068\u3057\u3066<br \/>\n\u300enum\u300f\u3068\u540c\u7b49\u306e\u6271\u3044\u3067\u300eif\u300f\u3068\u304b\u300efor\u300f\u3092<br \/>\n\u4f7f\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<h2><span id=\"python-4\">python\u5909\u6570\u5ba3\u8a00\u307e\u3068\u3081<\/span><\/h2>\n<p>python\u3067\u306f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">num = 91\r\nname ='5963'<\/pre>\n<p>\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u5909\u6570\u3092\u5ba3\u8a00\u3059\u308b\u524d\u306b<br \/>\nint\u578b\u3060\u3068\u304bstring\u578b\u3060\u3068\u5ba3\u8a00\u3057\u306a\u304f\u3066\u3044\u3044\u308f\u3051\u3067\u3059\u3002<\/p>\n<p>\u697d\u3068\u3044\u3048\u3070\u697d\u306a\u3093\u3067\u3059\u304c<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d0\u30b0\u306b\u3064\u306a\u304c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3082\u9006\u306b\u3044\u3046\u3068\u3001\u52dd\u624b\u306bpython\u304c\u5224\u65ad\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u5165\u529b\u3057\u305f\u308a\u8003\u3048\u305f\u308a\u3059\u308b\u624b\u9593\u304c\u7701\u3051\u307e\u3059\u3002<br \/>\n\u3060\u304b\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u958b\u767a\u304c\u3057\u3084\u3059\u304f\u306a\u308b\u3068\u3044\u3046\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u3053\u306e\u8a18\u4e8b\u3067\u306fPythonn\u306e\u5909\u6570\u5ba3\u8a00\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8a18\u4e8b\u306fPycharm\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002 \u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u65b9\u306f \u30b3\u30c1\u30e9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 Pycharm\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u77e5\u308a\u305f\u3044\u65b9\u306f\u3053\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044 [&hellip;]","protected":false},"author":1,"featured_media":147,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,17],"tags":[3,15],"_links":{"self":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/145"}],"collection":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=145"}],"version-history":[{"count":22,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/145\/revisions"}],"predecessor-version":[{"id":267,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/145\/revisions\/267"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/media\/147"}],"wp:attachment":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}