{"id":63824,"date":"2018-07-23T10:50:30","date_gmt":"2018-07-23T01:50:30","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=63824"},"modified":"2024-05-06T11:49:58","modified_gmt":"2024-05-06T02:49:58","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91queue%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/63824","title":{"rendered":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b"},"content":{"rendered":"\n<p><div class=\"box_voice\"><br>Python\u3067\u30ad\u30e5\u30fc\uff08queue\uff09\u3092\u6271\u3046\u65b9\u6cd5\u3092\u77e5\u308a\u305f\u3044<br>\u305d\u3082\u305d\u3082\u30c7\u30fc\u30bf\u69cb\u9020\u3063\u3066\u4f55\uff1f<br>Python\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u6271\u3046\u65b9\u6cd5\u304c\u77e5\u308a\u305f\u3044<br><\/div><\/p>\n\n\n\n<p>\u7686\u3055\u3093\u306f\u30ad\u30e5\u30fc\u3084\u30b9\u30bf\u30c3\u30af\u306a\u3069\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u306f\u77e5\u3063\u3066\u3044\u307e\u3059\u304b\uff1f\u4eca\u56de\u306fPython\u3067\u30ad\u30e5\u30fc\u3084\u30b9\u30bf\u30c3\u30af\u3092\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\uff01<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<\/p>\n\n\n<div class=\"box01\">\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u30c7\u30fc\u30bf\u69cb\u9020\u3068\u306f<\/b><\/li>\n\n\n\n<li><b>\u30ad\u30e5\u30fc\u3068\u306f<\/b><\/li>\n\n\n\n<li><b>\u30b9\u30bf\u30c3\u30af\u3068\u306f<\/b><\/li>\n\n\n\n<li><b>queue\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\uff08FIFO\u3001LIFO\uff09<\/b><\/li>\n\n\n\n<li><b>queue\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u6271\u3046\u65b9\u6cd5<\/b><\/li>\n<\/ul>\n\n\n<\/div>\n\n\n\n<p>\u306a\u3069\u306e\u57fa\u672c\u7684\u306a\u5185\u5bb9\u304b\u3089\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u3082\u3053\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u304f\u306e\u3067\u305c\u3072\u3054\u89a7\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3092\u8aad\u3080\u524d\u306b\u3001Python\u304c\u3069\u3093\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306a\u306e\u304b\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u304a\u304d\u305f\u3044\u4eba\u306f\u6b21\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u2192&nbsp;<a href=\"https:\/\/www.sejuku.net\/blog\/7720\">Python\u3068\u306f\uff1f\u7279\u5fb4\u3084\u3067\u304d\u308b\u3053\u3068\u3001\u6d3b\u7528\u4f8b\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u7c21\u5358\u306b\u89e3\u8aac<\/a><\/p>\n\n\n\n<p>\u306a\u304a\u3001\u305d\u306e\u4ed6\u306ePython\u306e\u8a18\u4e8b\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/www.sejuku.net\/blog\/147190\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python\u306equeue\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u69cb\u9020\u3068\u306f<\/h3>\n\n\n\n<p>\u30ad\u30e5\u30fc\u306b\u3064\u3044\u3066\u77e5\u308b\u524d\u306b\u3001\u307e\u305a\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u77e5\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u30c7\u30fc\u30bf\u69cb\u9020\u306f\u3001<b>\u30c7\u30fc\u30bf\u306e\u96c6\u307e\u308a\u3092\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3067\u52b9\u7387\u3088\u304f\u6271\u3046\u4ed5\u7d44\u307f<\/b>\u306e\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u958b\u767a\u3067\u306f\u3069\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u9069\u5207\u306a\u5834\u9762\u3067\u4f7f\u3048\u308b\u304b\u306b\u3088\u3063\u3066\u4f7f\u3044\u52dd\u624b\u3084\u6027\u80fd\u304c\u5927\u304d\u304f\u5909\u308f\u3063\u3066\u304d\u307e\u3059\u3002\u305d\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u4e00\u3064\u306b\u3001\u30ad\u30e5\u30fc\u3084\u30b9\u30bf\u30c3\u30af\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30ad\u30e5\u30fc\u3068\u306f<\/h3>\n\n\n\n<p>\u30ad\u30e5\u30fc\u306f\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u4e00\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30b3\u30f3\u30d3\u30cb\u3084\u30c7\u30d1\u30fc\u30c8\u306a\u3069\u3067\u30ec\u30b8\u306b\u4e26\u3076\u3068\u304d\u3092\u601d\u3044\u51fa\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u5148\u306b\u4e26\u3093\u3060\u4eba\u304c\u5148\u306b\u4f1a\u8a08\u3092\u3057\u3066\u3082\u3089\u3044\u3001\u5f8c\u304b\u3089\u6765\u305f\u4eba\u306f\u305d\u306e\u4eba\u306e\u5f8c\u308d\u306b\u7d9a\u3044\u3066&#8230;\u3068\u8a00\u3046\u69cb\u9020\u306b\u306a\u3063\u3066\u307e\u3059\u3088\u306d\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5148\u5165\u308c\u5148\u51fa\u3057\u3001First In First Out\uff08FIFO\uff09\u306e\u69cb\u9020\u3092\u3001\u30ad\u30e5\u30fc\u3068\u547c\u3073\u307e\u3059\u3002\u3053\u306e\u30ad\u30e5\u30fc\u306b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u3044\u304f\u3068<b>\u3001\u5165\u308c\u305f\u9806\u756a\u901a\u308a\u306e\u9806\u756a<\/b>\u306b\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u3066\u3001\u9014\u4e2d\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u51fa\u6765\u306a\u3044\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u30ad\u30e5\u30fc\u306b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u308b\u3053\u3068\u3092\u30a8\u30f3\u30ad\u30e5\u30fc\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3053\u3068\u3092\u30c7\u30ad\u30e5\u30fc\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b9\u30bf\u30c3\u30af\u3068\u306f<\/h3>\n\n\n\n<p>\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u3082\u89e6\u308c\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306f\u30ad\u30e5\u30fc\u3068\u3088\u304f\u6bd4\u8f03\u3055\u308c\u308b\u5bfe\u8c61\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u673a\u306b\u7a4d\u307f\u91cd\u306a\u3063\u305f\u66f8\u985e\u3092\u601d\u3044\u51fa\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e\u66f8\u985e\u307b\u3069\u4e0b\u306b\u306a\u308a\u3001\u65b0\u3057\u3044\u66f8\u985e\u307b\u3069\u4e0a\u306b\u7a4d\u307f\u91cd\u306a\u3063\u3066\u3044\u304d\u307e\u3059\u3088\u306d\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5f8c\u5165\u308c\u5148\u51fa\u3057\u3001Last In First Out\uff08LIFO\uff09\u306e\u69cb\u9020\u3092\u30b9\u30bf\u30c3\u30af\u3068\u547c\u3073\u307e\u3059\u3002\u3053\u306e\u30b9\u30bf\u30c3\u30af\u306b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u3066\u3044\u304f\u3068\u3001<b>\u5165\u308c\u305f\u9806\u756a\u3068\u306f\u9006\u306e\u9806\u756a<\/b>\u306b\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3053\u306e\u30b9\u30bf\u30c3\u30af\u3082\u9014\u4e2d\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u51fa\u6765\u307e\u305b\u3093\u3002\u3053\u306e\u30b9\u30bf\u30c3\u30af\u306b\u30c7\u30fc\u30bf\u3092\u5165\u308c\u308b\u3053\u3068\u3092\u30d7\u30c3\u30b7\u30e5\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3053\u3068\u3092\u30dd\u30c3\u30d7\u3068\u547c\u3073\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u57fa\u672c\u7684\u306b\u306f\u30b9\u30bf\u30c3\u30af\u3068\u30ad\u30e5\u30fc\u306f\u5225\u306e\u6271\u3044\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u3059\u304c\u3001Python\u306equeue\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u304c\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">queue\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f<\/h3>\n\n\n\n<p>\u4e0a\u8a18\u3067\u89e3\u8aac\u3057\u305f\u30b9\u30bf\u30c3\u30af\u3068\u30ad\u30e5\u30fc\u3092\u81ea\u5206\u3067\u5b9f\u88c5\u3059\u308b\u306e\u306f\u610f\u5916\u3068\u7c21\u5358\u306a\u306e\u3067\u3059\u304c\u3001\u3053\u306equeue\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3048\u3070\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3073\u51fa\u3057\u3060\u3051\u3067\u66f4\u306b\u7c21\u5358\u306b\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<p>queue\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u307e\u305aimport\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import queue<\/pre>\n\n\n\n<p>\u3053\u308c\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u306a\u3051\u308c\u3070import\u306f\u6210\u529f\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3057Python2\u7cfb\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import Queue<\/pre>\n\n\n\n<p>\u306e\u3088\u3046\u306b\u3001\u5927\u6587\u5b57\u3067\u6307\u5b9a\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>Python2\u7cfb\u30683\u7cfb\u3067\u306f\u3053\u306e\u3088\u3046\u306b\u5927\u6587\u5b57\u8868\u8a18\u304b\u3089\u5c0f\u6587\u5b57\u8868\u793a\u306b\u5909\u66f4\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u6c17\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002\u4ee5\u964d\u3053\u306e\u8a18\u4e8b\u3067\u306fPython3\u7cfb\u306b\u3064\u3044\u3066\u89e3\u8aac\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">queue\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">FIFO\u30ad\u30e5\u30fc\uff08\u30ad\u30e5\u30fc\uff09<\/h3>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u4e00\u822c\u7684\u306a\u30ad\u30e5\u30fc\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u3053\u3061\u3089\u306e\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from queue import Queue\n\nq = Queue()\n\nabc = ['a','b','c','d','e']\nfor i in abc:\n    q.put(i)\n    print(\"Enqueue:\"+i)\n\nprint(\"--------\")\n\nwhile True:\n    if q.empty():\n        break\n    else:\n        i = q.get()\n        print(\"Dequeue:\"+i)<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Enqueue:a\nEnqueue:b\nEnqueue:c\nEnqueue:d\nEnqueue:e\n--------\nDequeue:a\nDequeue:b\nDequeue:c\nDequeue:d\nDequeue:e<\/pre>\n\n\n\n<p>\u307e\u305a\u306fqueue\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089<span style=\"color: #339966;\"><strong>Queue\u30af\u30e9\u30b9<\/strong><\/span>\u3092\u9078\u3093\u3067import\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>import\u306e\u8a73\u3057\u3044\u89e3\u8aac\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n            <a href=\"https:\/\/www.sejuku.net\/blog\/25587\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/image-126-150x84.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u306f\u3058\u3081\u3066\u306ePython\uff01\u30d1\u30c3\u30b1\u30fc\u30b8\u3092import\u3059\u308b\u65b9\u6cd5\u3092\u3084\u3055\u3057\u304f\u89e3\u8aac\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n\n\n\n<p>\u305d\u3057\u3066abc\u3068\u3044\u3046\u30ea\u30b9\u30c8\u306e\u4e2d\u306b\u3042\u308b\u6587\u5b57\u3092\u4e00\u3064\u305a\u3064\u30a8\u30f3\u30ad\u30e5\u30fc\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u5f8c\u306bq\u304c\u7a7a\u306b\u306a\u308b\u307e\u3067\u3001q\u306e\u4e2d\u8eab\u3092\u30c7\u30ad\u30e5\u30fc\u3057\u3066\u3044\u307e\u3059\u3002\u5b9f\u884c\u7d50\u679c\u306b\u4e26\u3076\u9806\u756a\u304c\u540c\u3058\u306a\u306e\u3067\u3001FIFO\u304c\u78ba\u8a8d\u51fa\u6765\u307e\u3057\u305f\u306d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">LIFO\u30ad\u30e5\u30fc\uff08\u30b9\u30bf\u30c3\u30af\uff09<\/h3>\n\n\n\n<p>\u6b21\u306f\u30b9\u30bf\u30c3\u30af\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u3053\u3061\u3089\u306e\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from queue import LifoQueue\n\nq = LifoQueue()\n\nabc = ['a','b','c','d','e']\nfor i in abc:\n    q.put(i)\n    print(\"Enqueue:\"+i)\n\nprint(\"--------\")\n\nwhile True:\n    if q.empty():\n        break\n    else:\n        i = q.get()\n        print(\"Dequeue:\"+i)<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Enqueue:a\nEnqueue:b\nEnqueue:c\nEnqueue:d\nEnqueue:e\n--------\nDequeue:e\nDequeue:d\nDequeue:c\nDequeue:b\nDequeue:a<\/pre>\n\n\n\n<p>\u307e\u305a\u306f\u5148\u7a0b\u306e\u3088\u3046\u306b\u3001queue\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089LifoQueue\u30af\u30e9\u30b9\u3092\u9078\u3093\u3067import\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u3057\u3066abc\u3068\u3044\u3046\u30ea\u30b9\u30c8\u306e\u4e2d\u306b\u3042\u308b\u6587\u5b57\u3092\u4e00\u3064\u305a\u3064\u30d7\u30c3\u30b7\u30e5\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u5f8c\u306bq\u304c\u7a7a\u306b\u306a\u308b\u307e\u3067\u3001q\u306e\u4e2d\u8eab\u3092\u30dd\u30c3\u30d7\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\u306b<b>\u4e26\u3076\u9806\u756a\u304c\u3061\u3087\u3046\u3069\u9006<\/b>\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001LIFO\u304c\u78ba\u8a8d\u51fa\u6765\u307e\u3057\u305f\u306d\u3002<\/p>\n\n\n\n<p>\u3061\u306a\u307f\u306bput\u30e1\u30bd\u30c3\u30c9\u3068get\u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30d6\u30ea\u30c3\u30af\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u30ad\u30e5\u30fc\u3068\u30b9\u30bf\u30c3\u30af\u3067\u306f\u5171\u901a\u3067\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">queue\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u6271\u3046<\/h2>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u306f\u57fa\u672c\u7684\u306aqueue\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u6271\u3044\u65b9\u306b\u3064\u3044\u3066\u898b\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u95a2\u9023\u6027\u306e\u3042\u308b\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3064\u3044\u3066\u3001\u7c21\u5358\u306b\u5b66\u3093\u3067\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>Python\u306fC\u8a00\u8a9e\u306a\u3069\u306b\u6bd4\u3079\u3066\u6bd4\u8f03\u7684\u901f\u5ea6\u306e\u9045\u3044\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u304c\u3001\u51e6\u7406\u901f\u5ea6\u3092\u4e0a\u3052\u305f\u3044\u3088\u3046\u306a\u91cd\u3044\u51e6\u7406\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u6271\u3063\u305f\u4e26\u884c\u51e6\u7406\u3092\u3059\u308b\u5fc5\u8981\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u57fa\u672c\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9\u3067\u3001\u4e0a\u304b\u3089\u4e0b\u306b\u5411\u3051\u3066\u9806\u756a\u306b\u3001\u4e00\u3064\u4e00\u3064\u51e6\u7406\u3092\u7d42\u308f\u3089\u305b\u3066\u3044\u304f\u306e\u304c\u57fa\u672c\u3067\u3059\u3002\u305f\u3060\u3001\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\u5834\u5408\u306f\u3001\u3042\u308b\u51e6\u7406\u3092\u884c\u3044\u306a\u304c\u3089\u3001<b>\u3082\u3046\u4e00\u3064\u306e\u51e6\u7406\u3092\u540c\u6642\u306b\u884c\u3046<\/b>\u3053\u3068\u3067\u51e6\u7406\u901f\u5ea6\u3092\u4e0a\u3052\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u65e9\u901f\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import threading, queue\nimport time\n\ndef printNum(num, q):\n    for i in num:\n        print(\"Num:\",i)\n        time.sleep(5)\n        q.put(i)\n\ndef addX(q):\n    while True:\n        _num = q.get()\n        _num += 10\n        print(\"Num(add10):\",_num);\n        time.sleep(10)\n        q.task_done()\n\nq = queue.Queue()\nfor n in range(2):\n    thread = threading.Thread(target=addX, args=(q,))\n    thread.start()\n\nnum = [1,2,3,4,5,6,7,8,9]\nprintNum(num, q)\nq.join()<\/pre>\n\n\n\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306fthreading\u3068time\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092import\u3057\u3066\u3044\u307e\u3059\u304c\u3053\u3053\u3067\u5fc5\u8981\u306a\u306e\u306fthreading\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002\u3053\u306ethreading\u30e2\u30b8\u30e5\u30fc\u30eb\u3067printNum\u95a2\u6570\u3068addX\u95a2\u6570\u3092\u4e26\u884c\u51e6\u7406\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u4e26\u884c\u51e6\u7406\u3092\u3055\u305b\u308b\u305f\u3081\u306b\u30ad\u30e5\u30fc\u3092\u4f7f\u3063\u3066\u3001\u305d\u308c\u305e\u308c\u306e\u95a2\u6570\u3067\u5024\u3092\u6e21\u3057\u3066&lt;\u3044\u307e\u3059\u3002\u4e26\u884c\u51e6\u7406\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e2d\u3067\u3082\u5171\u901a\u3057\u3066\u3084\u3084\u96e3\u3057\u3044\u5206\u91ce\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u306f\u3053\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4ed5\u65b9\u3082\u3042\u308b\u3093\u3060\u3068\u3044\u3063\u305f\u7a0b\u5ea6\u306b\u899a\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4eca\u56de\u306fqueue\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u3001\u30ad\u30e5\u30fc\u3068\u30b9\u30bf\u30c3\u30af&lt;\u3092\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u308f\u304b\u3063\u3066\u9802\u3051\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n\n\n\n<p>queue\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f<b>\u540c\u3058\u30e1\u30bd\u30c3\u30c9\u3092\u9055\u3046\u30af\u30e9\u30b9\u3067\u3082\u4f7f\u3046<\/b>\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3057\u30ad\u30e5\u30fc\u3084\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3068\u304d\u306f\u3001\u307e\u305f\u305c\u3072\u3053\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u30ad\u30e5\u30fc\uff08queue\uff09\u3092\u6271\u3046\u65b9\u6cd5\u3092\u77e5\u308a\u305f\u3044\u305d\u3082\u305d\u3082\u30c7\u30fc\u30bf\u69cb\u9020\u3063\u3066\u4f55\uff1fPython\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u6271\u3046\u65b9\u6cd5\u304c\u77e5\u308a\u305f\u3044 \u7686\u3055\u3093\u306f\u30ad\u30e5\u30fc\u3084\u30b9\u30bf\u30c3\u30af\u306a\u3069\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u306f\u77e5\u3063\u3066\u3044\u307e\u3059\u304b\uff1f\u4eca\u56de\u306fPython\u3067\u30ad\u30e5 [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":98456,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2350],"tags":[49,1620],"class_list":["post-63824","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-study","tag-python","tag-queue"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/63824\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/63824\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-23T01:50:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:49:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"810\" \/>\n\t<meta property=\"og:image:height\" content=\"460\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\",\"datePublished\":\"2018-07-23T01:50:30+00:00\",\"dateModified\":\"2024-05-06T02:49:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824\"},\"wordCount\":95,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/python_queue.jpg\",\"keywords\":[\"python\",\"Queue\"],\"articleSection\":[\"Python\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824\",\"name\":\"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/python_queue.jpg\",\"datePublished\":\"2018-07-23T01:50:30+00:00\",\"dateModified\":\"2024-05-06T02:49:58+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/python_queue.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/python_queue.jpg\",\"width\":810,\"height\":460},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/63824#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/63824","og_locale":"ja_JP","og_type":"article","og_title":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/63824","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2018-07-23T01:50:30+00:00","article_modified_time":"2024-05-06T02:49:58+00:00","og_image":[{"width":810,"height":460,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/63824#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/63824"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b","datePublished":"2018-07-23T01:50:30+00:00","dateModified":"2024-05-06T02:49:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/63824"},"wordCount":95,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/63824#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg","keywords":["python","Queue"],"articleSection":["Python\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/63824","url":"https:\/\/www.sejuku.net\/blog\/63824","name":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/63824#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/63824#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg","datePublished":"2018-07-23T01:50:30+00:00","dateModified":"2024-05-06T02:49:58+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/63824#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/63824"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/63824#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/python_queue.jpg","width":810,"height":460},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/63824#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u306equeue\uff08\u30ad\u30e5\u30fc\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/63824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=63824"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/63824\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/98456"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=63824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=63824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=63824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}