{"id":47,"date":"2026-02-03T14:39:11","date_gmt":"2026-02-03T14:39:11","guid":{"rendered":"https:\/\/hainn.id.vn\/?p=47"},"modified":"2026-02-03T16:55:56","modified_gmt":"2026-02-03T16:55:56","slug":"so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python","status":"publish","type":"post","link":"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/","title":{"rendered":"So s\u00e1nh s\u1ef1 kh\u00e1c nhau gi\u1eefa break, pass v\u00e0 continue &#8211; Ph\u00e2n bi\u1ec7t c\u00e1c c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n v\u00f2ng l\u1eb7p trong Python"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Trong l\u1eadp tr\u00ecnh Python, v\u00f2ng l\u1eb7p\u00a0<code>for<\/code>\u00a0v\u00e0\u00a0<code>while<\/code>\u00a0l\u00e0 nh\u1eefng c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u1ea1o ra c\u00e1c chu tr\u00ecnh x\u1eed l\u00fd l\u1eb7p l\u1ea1i li\u00ean t\u1ee5c. \u0110\u1ec3 ki\u1ec3m so\u00e1t lu\u1ed3ng th\u1ef1c thi m\u1ed9t c\u00e1ch linh ho\u1ea1t h\u01a1n, ch\u00fang ta th\u01b0\u1eddng d\u00f9ng \u0111\u1ebfn c\u00e1c c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n nh\u01b0\u00a0<code>break<\/code>,\u00a0<code>pass<\/code>\u00a0v\u00e0\u00a0<code>continue<\/code>.<a href=\"https:\/\/quantrimang.com\/hoc\/lenh-break-va-continue-trong-python-142623\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ba l\u1ec7nh n\u00e0y tuy \u0111\u01a1n gi\u1ea3n nh\u01b0ng th\u01b0\u1eddng g\u00e2y nh\u1ea7m l\u1eabn do ch\u1ee9c n\u0103ng kh\u00e1 t\u01b0\u01a1ng \u0111\u1ed3ng. B\u00e0i vi\u1ebft n\u00e0y s\u1ebd \u0111i s\u00e2u ph\u00e2n t\u00edch s\u1ef1 kh\u00e1c bi\u1ec7t c\u1ee7a t\u1eebng c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n \u0111\u1ec3 gi\u00fap b\u1ea1n v\u1eadn d\u1ee5ng t\u1ed1t v\u00e0o b\u00e0i t\u1eadp v\u00e0 c\u00e1c d\u1ef1 \u00e1n th\u1ef1c t\u1ebf.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#Tong_quan_ve_vong_lap_trong_Python\" >T\u1ed5ng quan v\u1ec1 v\u00f2ng l\u1eb7p trong Python<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#Vong_lap_for\" >V\u00f2ng l\u1eb7p for<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#Vong_lap_while\" >V\u00f2ng l\u1eb7p while<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#Chuc_nang_cua_cac_cau_lenh_dieu_khien\" >Ch\u1ee9c n\u0103ng c\u1ee7a c\u00e1c c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#break\" >break<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#continue\" >continue<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/hainn.id.vn\/index.php\/2026\/02\/03\/so-sanh-su-khac-nhau-giua-break-pass-va-continue-phan-biet-cac-cau-lenh-dieu-khien-vong-lap-trong-python\/#pass\" >pass<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tong_quan_ve_vong_lap_trong_Python\"><\/span>T\u1ed5ng quan v\u1ec1 v\u00f2ng l\u1eb7p trong Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Trong Python, <strong>v\u00f2ng l\u1eb7p (loop)<\/strong> \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng khi ta c\u1ea7n th\u1ef1c hi\u1ec7n <strong>m\u1ed9t kh\u1ed1i l\u1ec7nh l\u1eb7p \u0111i l\u1eb7p l\u1ea1i nhi\u1ec1u l\u1ea7n<\/strong> theo m\u1ed9t \u0111i\u1ec1u ki\u1ec7n ho\u1eb7c tr\u00ean m\u1ed9t t\u1eadp d\u1eef li\u1ec7u x\u00e1c \u0111\u1ecbnh. Hai lo\u1ea1i v\u00f2ng l\u1eb7p ph\u1ed5 bi\u1ebfn nh\u1ea5t l\u00e0 <code>for<\/code> v\u00e0 <code>while<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Vong_lap_for\"><\/span>V\u00f2ng l\u1eb7p <code>for<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>for<\/code> th\u01b0\u1eddng \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 <strong>duy\u1ec7t qua m\u1ed9t t\u1eadp h\u1ee3p<\/strong> (iterable) nh\u01b0 danh s\u00e1ch, chu\u1ed7i, tuple, dictionary ho\u1eb7c <code>range<\/code> (t\u1ee9c s\u1ed1 l\u01b0\u1ee3ng ph\u1ea7n t\u1eed \u0111\u00e3 \u0111\u01b0\u1ee3c x\u00e1c \u0111\u1ecbnh tr\u01b0\u1edbc).<\/li>\n\n\n\n<li>C\u00fa ph\u00e1p c\u01a1 b\u1ea3n:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in iterable:\n    # kh\u1ed1i l\u1ec7nh\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lu\u1ed3ng th\u1ef1c thi: Python l\u1ea5y t\u1eebng ph\u1ea7n t\u1eed trong iterable g\u00e1n cho bi\u1ebfn \u0111\u1ebfm <code>i<\/code> r\u1ed3i th\u1ef1c thi kh\u1ed1i l\u1ec7nh b\u00ean trong. Qu\u00e1 tr\u00ecnh n\u00e0y l\u1eb7p l\u1ea1i cho \u0111\u1ebfn khi ch\u1ea1y h\u1ebft ph\u1ea7n t\u1eed c\u1ee7a iterable.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Vong_lap_while\"><\/span>V\u00f2ng l\u1eb7p <code>while<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>while<\/code> \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng khi ta <strong>kh\u00f4ng bi\u1ebft tr\u01b0\u1edbc s\u1ed1 l\u1ea7n l\u1eb7p<\/strong>, m\u00e0 ti\u1ebfp t\u1ee5c l\u1eb7p khi m\u1ed9t \u0111i\u1ec1u ki\u1ec7n c\u00f2n \u0111\u00fang.<\/li>\n\n\n\n<li>C\u00fa ph\u00e1p c\u01a1 b\u1ea3n:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>while condition:\n    # kh\u1ed1i l\u1ec7nh<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lu\u1ed3ng th\u1ef1c thi: Python ki\u1ec3m tra \u0111i\u1ec1u ki\u1ec7n, n\u1ebfu \u0111i\u1ec1u ki\u1ec7n \u0111\u00fang th\u00ec ch\u1ea1y kh\u1ed1i l\u1ec7nh. Ti\u1ebfp t\u1ee5c nh\u01b0 v\u1eady cho \u0111\u1ebfn khi \u0111i\u1ec1u ki\u1ec7n sai th\u00ec tho\u00e1t v\u00f2ng l\u1eb7p.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Chuc_nang_cua_cac_cau_lenh_dieu_khien\"><\/span>Ch\u1ee9c n\u0103ng c\u1ee7a c\u00e1c c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"break\"><\/span><code>break<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1eeb &#8220;break&#8221; trong Ti\u1ebfng Anh l\u00e0 &#8220;g\u00e3y&#8221;, &#8220;v\u1ee1&#8221;, t\u1ee9c c\u00e1c th\u00e0nh ph\u1ea7n t\u00e1ch r\u1eddi nhau ra. <code>break<\/code> trong v\u00f2ng l\u1eb7p c\u1ee7a Python c\u0169ng mang \u00fd ngh\u0129a t\u01b0\u01a1ng t\u1ef1. Khi ch\u1ea1y \u0111\u1ebfn n\u00f3, v\u00f2ng l\u1eb7p s\u1ebd k\u1ebft th\u00fac <strong>ngay l\u1eadp t\u1ee9c<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in range(4):\n  if i == 2:\n    break\n  print(i)\n#Output:\n0\n1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Trong v\u00ed d\u1ee5 tr\u00ean, c\u00f3 th\u1ec3 th\u1ea5y Python ch\u1ec9 in ra 0 v\u00e0 1, ch\u1ee9ng t\u1ecf khi v\u00f2ng l\u1eb7p <code>i<\/code> \u0111i t\u1edbi gi\u00e1 tr\u1ecb 2 th\u00ec \u0111\u00e3 kh\u00f4ng th\u1ec3 th\u1ef1c thi ti\u1ebfp do c\u00f3 l\u1ec7nh <code>break<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"continue\"><\/span><code>continue<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u00e1i ng\u01b0\u1ee3c v\u1edbi &#8220;break&#8221;, &#8220;continue&#8221; ngh\u0129a l\u00e0 ti\u1ebfp t\u1ee5c, kh\u00f4ng d\u1eebng l\u1ea1i. Nh\u01b0ng b\u1ea3n ch\u1ea5t c\u1ee7a v\u00f2ng l\u1eb7p l\u00e0 <strong>ch\u1ea1y xoay v\u00f2ng li\u00ean t\u1ee5c<\/strong> m\u00e0, v\u1eady c\u00f3 th\u00eam continue th\u00ec c\u00f3 kh\u00e1c g\u00ec?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00e2ng, n\u00f3i m\u1ed9t c\u00e1ch d\u00e2n d\u00e3 th\u00ec l\u1ec7nh <code>continue<\/code> l\u00e0 &#8220;ch\u00f3 c\u1ee9 s\u1ee7a v\u00e0 \u0111o\u00e0n ng\u01b0\u1eddi c\u1ee9 \u0111i&#8221;, t\u1ee9c ph\u1ea7n code sau \u0111\u00f3 c\u00f3 y\u00eau c\u1ea7u l\u00e0m g\u00ec th\u00ec c\u0169ng m\u1eb7c k\u1ec7, ch\u1ea1y sang v\u00f2ng l\u1eb7p ti\u1ebfp theo th\u00f4i! T\u00fam l\u1ea1i, <code>continue<\/code> l\u00e0 b\u1ecf qua, kh\u00f4ng th\u1ef1c thi code trong v\u00f2ng l\u1eb7p hi\u1ec7n t\u1ea1i n\u1eefa.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">D\u1eabn ch\u1ee9ng l\u00e0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in range(4):\n  if i == 2:\n    continue\n  print(i)\n#Output:\n0\n1\n3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">V\u1eabn v\u1edbi c\u1ea5u tr\u00fac code g\u1ea7n nh\u01b0 t\u01b0\u01a1ng t\u1ef1 ph\u1ea7n tr\u00ean, nh\u01b0ng \u1edf \u0111\u00e2y, khi break \u0111\u01b0\u1ee3c thay b\u1eb1ng continue, Python ch\u1ec9 b\u1ecf qua 1 v\u00f2ng l\u1eb7p ch\u1ee9 kh\u00f4ng d\u1eebng h\u1eb3n. B\u1eb1ng ch\u1ee9ng l\u00e0 n\u00f3 v\u1eabn in ra s\u1ed1 3 sau khi b\u1ecf qua s\u1ed1 2.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"pass\"><\/span><code>pass<\/code><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y l\u00e0 c\u00e2u l\u1ec7nh d\u1ec5 nh\u1ea7m nh\u1ea5t trong b\u1ed9 ba <code>break<\/code> &#8211; <code>pass<\/code> &#8211; <code>continue<\/code>. &#8220;Pass&#8221; l\u00e0 tr\u00f4i qua, v\u01b0\u1ee3t qua. Nghe c\u00f3 v\u1ebb gi\u00f4ng gi\u1ed1ng &#8220;continue&#8221; nh\u1ec9?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u01b0ng th\u1ef1c ra, <code>pass<\/code> l\u1ea1i kh\u00e1c <code>continue<\/code> \u1edf 1 chi ti\u1ebft r\u1ea5t nh\u1ecf: c\u1ea3 2 \u0111\u1ec1u &#8220;b\u1ecf qua&#8221;, nh\u01b0ng <code>continue<\/code> l\u00e0 b\u1ecf qua ph\u1ea7n v\u00f2ng l\u1eb7p <strong>sau n\u00f3<\/strong>, c\u00f2n <code>pass<\/code> th\u00ec ch\u1ec9 b\u1ecf qua <strong>ch\u00ednh n\u00f3<\/strong>. T\u1ee9c l\u00e0, n\u1ebfu sau <code>pass<\/code> v\u1eabn c\u00f3 code th\u00ec ph\u1ea7n code \u0111\u00f3 s\u1ebd \u0111\u01b0\u1ee3c th\u1ef1c thi nh\u01b0 b\u00ecnh th\u01b0\u1eddng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ta s\u1ebd th\u1ea5y r\u00f5 s\u1ef1 kh\u00e1c bi\u1ec7t \u0111\u00f3 \u1edf v\u00ed d\u1ee5 sau:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in range(4):\n  if i == 2:\n    pass\n    print(i) \n  print(i)\n#Output:\n0\n1\n2\n2\n3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u01b0 v\u1eady c\u00f3 th\u1ec3 th\u1ea5y sau <code>pass<\/code>, code v\u1eabn ch\u1ea1y b\u00ecnh th\u01b0\u1eddng v\u00e0 n\u00f3 ho\u00e0n to\u00e0n kh\u00f4ng \u1ea3nh h\u01b0\u1edfng t\u1edbi vi\u1ec7c th\u1ef1c thi to\u00e0n b\u1ed9 c\u00e2u l\u1ec7nh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u01b0ng nh\u01b0 th\u1ebf th\u00ec c\u00f3 v\u1ebb <code>pass<\/code> h\u01a1i v\u00f4 d\u1ee5ng nh\u1ec9 &#8211; ai \u0111\u1eddi l\u1ea1i t\u1ef1 b\u1ecf qua ch\u00ednh m\u00ecnh? V\u1eady th\u1ee9 &#8220;v\u00f4 d\u1ee5ng&#8221; n\u00e0y s\u1ebd \u0111\u01b0\u1ee3c \u1ee9ng d\u1ee5ng sao \u0111\u00e2y?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Th\u1ef1c t\u1ebf, ch\u00ednh v\u00ec s\u1ef1 &#8220;v\u00f4 d\u1ee5ng&#8221; n\u00e0y, <code>pass<\/code> l\u1ea1i tr\u1edf th\u00e0nh m\u1ed9t c\u00e2u l\u1ec7nh c\u1ef1c k\u00ec quan tr\u1ecdng khi vi\u1ebft code. N\u00f3 s\u1eafm vai &#8220;k\u1ebb gi\u1eef ch\u1ed7&#8221; trong c\u00e1c ph\u1ea7n code ch\u01b0a c\u00f3 c\u00e2u l\u1ec7nh chi ti\u1ebft. N\u00f4m na l\u00e0 ch\u1ed7 n\u00e0o c\u1ea7n l\u00e0m m\u1ed9t c\u00e1i g\u00ec \u0111\u00f3 nh\u01b0ng ch\u01b0a ngh\u0129 ra c\u00e1ch l\u00e0m, ho\u1eb7c ch\u01b0a \u0111\u1ee7 \u0111i\u1ec1u ki\u1ec7n \u0111\u1ec3 l\u00e0m, c\u1ee9 \u0111\u1eb7t <code>pass<\/code> v\u00e0o \u0111\u00f3 cho kh\u1ecfi qu\u00ean.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def process_data(data):\n  # H\u00e0m n\u00e0y s\u1ebd \u0111\u01b0\u1ee3c tri\u1ec3n khai sau \u0111\u1ec3 x\u1eed l\u00fd d\u1eef li\u1ec7u\n  pass<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Trong tr\u01b0\u1eddng h\u1ee3p tr\u00ean, n\u1ebfu ch\u1ec9 khai b\u00e1o h\u00e0m m\u00e0 kh\u00f4ng c\u00f3 c\u00e2u l\u1ec7nh trong h\u00e0m th\u00ec l\u1eadp t\u1ee9c xu\u1ea5t hi\u1ec7n l\u1ed7i. Nh\u01b0ng nh\u1edd c\u00f3 <code>pass<\/code>, kh\u00f4ng c\u00f3 g\u00ec \u0111\u01b0\u1ee3c th\u1ef1c thi c\u1ea3, nh\u01b0ng c\u0169ng kh\u00f4ng l\u1ed7i. L\u1ee3i \u0111\u1ee7 \u0111\u01b0\u1eddng!<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>V\u1eady ch\u1ed1t l\u1ea1i\u00a0<\/strong><code>break<\/code><strong>\u00a0th\u1ef1c thi v\u00f2ng l\u1eb7p \u0111\u1ebfn m\u1ed9t \u0111i\u1ec1u ki\u1ec7n c\u1ee5 th\u1ec3 th\u00ec d\u1eebng;\u00a0<\/strong><code>continue<\/code><strong>\u00a0th\u00ec th\u1ef1c thi v\u00f2ng l\u1eb7p theo c\u00e1c \u0111i\u1ec1u ki\u1ec7n nh\u1ea5t \u0111\u1ecbnh; c\u00f2n\u00a0<\/strong><code>pass<\/code><strong>\u00a0th\u00ec d\u00f9ng \u0111\u1ec3 gi\u1eef ch\u1ed7, t\u1ee9c d\u00f9ng cho m\u1ed9t c\u00e2u l\u1ec7nh c\u1ea7n thi\u1ebft v\u1ec1 m\u1eb7t c\u00fa ph\u00e1p nh\u01b0ng ch\u01b0a mu\u1ed1n l\u1ec7nh n\u00e0o \u0111\u01b0\u1ee3c ch\u1ea1y.<\/strong><\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Trong l\u1eadp tr\u00ecnh Python, v\u00f2ng l\u1eb7p\u00a0for\u00a0v\u00e0\u00a0while\u00a0l\u00e0 nh\u1eefng c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u1ea1o ra c\u00e1c chu tr\u00ecnh x\u1eed l\u00fd l\u1eb7p l\u1ea1i li\u00ean t\u1ee5c. \u0110\u1ec3 ki\u1ec3m so\u00e1t lu\u1ed3ng th\u1ef1c thi m\u1ed9t c\u00e1ch linh ho\u1ea1t h\u01a1n, ch\u00fang ta th\u01b0\u1eddng d\u00f9ng \u0111\u1ebfn c\u00e1c c\u00e2u l\u1ec7nh \u0111i\u1ec1u khi\u1ec3n nh\u01b0\u00a0break,\u00a0pass\u00a0v\u00e0\u00a0continue. Ba l\u1ec7nh n\u00e0y tuy \u0111\u01a1n gi\u1ea3n nh\u01b0ng th\u01b0\u1eddng g\u00e2y nh\u1ea7m [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[18,17,19,16],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-coding","tag-cau-lenh-dieu-khien","tag-loop","tag-python","tag-vong-lap"],"_links":{"self":[{"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":5,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":53,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions\/53"}],"wp:attachment":[{"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hainn.id.vn\/index.php\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}