{"id":78515,"date":"2024-09-20T15:55:06","date_gmt":"2024-09-20T08:55:06","guid":{"rendered":"https:\/\/itviec.com\/blog\/?p=78515"},"modified":"2025-09-27T23:14:58","modified_gmt":"2025-09-27T16:14:58","slug":"code-python-co-ban","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/code-python-co-ban\/","title":{"rendered":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 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\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/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:\/\/itviec.com\/blog\/code-python-co-ban\/#Cac_kien_thuc_code_Python_co_ban_can_biet\" >C\u00e1c ki\u1ebfn th\u1ee9c code Python c\u01a1 b\u1ea3n c\u1ea7n bi\u1ebft<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Code_Python_co_ban_Cau_truc_du_lieu\" >Code Python c\u01a1 b\u1ea3n: C\u1ea5u tr\u00fac d\u1eef li\u1ec7u<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Code_Python_co_ban_Ham_va_Module\" >Code Python c\u01a1 b\u1ea3n: H\u00e0m v\u00e0 Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Code_Python_co_ban_Xu_ly_ngoai_le\" >Code Python c\u01a1 b\u1ea3n: X\u1eed l\u00fd ngo\u1ea1i l\u1ec7<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Code_Python_co_ban_Lam_viec_voi_file\" >Code Python c\u01a1 b\u1ea3n: L\u00e0m vi\u1ec7c v\u1edbi file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Thuc_hanh_va_bai_tap_code_Python_co_ban\" >Th\u1ef1c h\u00e0nh v\u00e0 b\u00e0i t\u1eadp code Python c\u01a1 b\u1ea3n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Cau_hoi_thuong_gap_ve_code_Python_co_ban\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 code Python c\u01a1 b\u1ea3n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/#Tong_ket_code_Python_co_ban\" >T\u1ed5ng k\u1ebft code Python c\u01a1 b\u1ea3n<\/a><\/li><\/ul><\/nav><\/div>\n\n<p><em><strong>Python hi\u1ec7n nay kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ph\u1ed5 bi\u1ebfn m\u00e0 c\u00f2n l\u00e0 l\u1ef1a ch\u1ecdn h\u00e0ng \u0111\u1ea7u c\u1ee7a nhi\u1ec1u l\u1eadp tr\u00ecnh vi\u00ean t\u1eeb c\u00e1c l\u0129nh v\u1ef1c kh\u00e1c nhau nh\u01b0 ph\u00e1t tri\u1ec3n web, khoa h\u1ecdc d\u1eef li\u1ec7u, tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o, v\u00e0 t\u1ef1 \u0111\u1ed9ng h\u00f3a. S\u1ee9c m\u1ea1nh v\u00e0 t\u00ednh linh ho\u1ea1t c\u1ee7a Python \u0111\u1ebfn t\u1eeb c\u00fa ph\u00e1p l\u1ec7nh Python \u0111\u01a1n gi\u1ea3n, d\u1ec5 ti\u1ebfp c\u1eadn, c\u00f9ng v\u1edbi m\u1ed9t c\u1ed9ng \u0111\u1ed3ng h\u1ed7 tr\u1ee3 r\u1ed9ng l\u1edbn. Tuy nhi\u00ean, \u0111\u1ec3 th\u1ef1c s\u1ef1 l\u00e0m ch\u1ee7 Python, vi\u1ec7c n\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m code Python c\u01a1 b\u1ea3n l\u00e0 \u0111i\u1ec1u ti\u00ean quy\u1ebft.<\/strong><\/em><\/p>\n\n\n\n<p>\u0110\u1ecdc b\u00e0i vi\u1ebft n\u00e0y \u0111\u1ec3 hi\u1ec3u r\u00f5:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">Kh\u00e1i ni\u1ec7m code Python c\u01a1 b\u1ea3n<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">C\u1ea5u tr\u00fac d\u1eef li\u1ec7u<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">H\u00e0m v\u00e0 module<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">X\u1eed l\u00fd ngo\u1ea1i l\u1ec7<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">L\u00e0m vi\u1ec7c v\u1edbi file<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\">Th\u1ef1c h\u00e0nh v\u00e0 b\u00e0i t\u1eadp<\/span><\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Tham kh\u1ea3o <strong><a href=\"https:\/\/itviec.com\/it-jobs\/python?utm_medium=anchor_text_high&amp;utm_source=blog&amp;utm_campaign=viec_lam_python&amp;utm_content=code_python_co_ban\" target=\"_blank\" rel=\"noreferrer noopener\">vi\u1ec7c l\u00e0m Python<\/a><\/strong> m\u1edbi nh\u1ea5t tr\u00ean to\u00e0n qu\u1ed1c<\/em><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cac-ki\u1ebfn-th\u1ee9c-code-python-c\u01a1-b\u1ea3n-c\u1ea7n-bi\u1ebft\"><span class=\"ez-toc-section\" id=\"Cac_kien_thuc_code_Python_co_ban_can_biet\"><\/span>C\u00e1c ki\u1ebfn th\u1ee9c code Python c\u01a1 b\u1ea3n c\u1ea7n bi\u1ebft<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-hello-world-cach-in-ra-dong-ch\u1eef-d\u1ea7u-tien-trong-python\"><b>Hello World: C\u00e1ch in ra d\u00f2ng ch\u1eef \u0111\u1ea7u ti\u00ean trong Python<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">L\u1ea7n \u0111\u1ea7u ti\u00ean h\u1ecdc l\u1eadp tr\u00ecnh, c\u00e2u l\u1ec7nh &#8220;Hello, World!&#8221; l\u00e0 b\u01b0\u1edbc kh\u1edfi \u0111\u1ea7u cho b\u1ea5t k\u1ef3 ng\u00f4n ng\u1eef n\u00e0o. Trong Python, c\u00e2u l\u1ec7nh n\u00e0y \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n \u0111\u01a1n gi\u1ea3n v\u1edbi:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">print(<\/span><span style=\"font-weight: 400;\">\"Hello, World!\"<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">Hello, World!<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e2u l\u1ec7nh n\u00e0y minh h\u1ecda c\u00e1ch Python t\u01b0\u01a1ng t\u00e1c v\u1edbi ng\u01b0\u1eddi d\u00f9ng, v\u00e0 n\u00f3 c\u0169ng gi\u00fap b\u1ea1n hi\u1ec3u c\u00e1ch Python x\u1eed l\u00fd c\u00e1c chu\u1ed7i k\u00fd t\u1ef1. C\u00fa ph\u00e1p \u0111\u01a1n gi\u1ea3n, kh\u00f4ng c\u1ea7n khai b\u00e1o t\u01b0\u1eddng minh nh\u01b0 \u1edf nhi\u1ec1u ng\u00f4n ng\u1eef kh\u00e1c, l\u00e0 m\u1ed9t trong nh\u1eefng l\u00fd do Python tr\u1edf n\u00ean ph\u1ed5 bi\u1ebfn.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-bi\u1ebfn-va-ki\u1ec3u-d\u1eef-li\u1ec7u-cach-khai-bao-bi\u1ebfn-va-s\u1eed-d\u1ee5ng-cac-ki\u1ec3u-d\u1eef-li\u1ec7u-c\u01a1-b\u1ea3n\"><b>Bi\u1ebfn v\u00e0 Ki\u1ec3u D\u1eef Li\u1ec7u: C\u00e1ch khai b\u00e1o bi\u1ebfn v\u00e0 s\u1eed d\u1ee5ng c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u c\u01a1 b\u1ea3n<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Python l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef \u0111\u1ed9ng, c\u00f3 ngh\u0129a l\u00e0 b\u1ea1n kh\u00f4ng c\u1ea7n khai b\u00e1o ki\u1ec3u d\u1eef li\u1ec7u c\u1ee7a bi\u1ebfn tr\u01b0\u1edbc khi s\u1eed d\u1ee5ng n\u00f3. V\u00ed d\u1ee5:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">x = <\/span><span style=\"font-weight: 400;\">5<\/span><span style=\"font-weight: 400;\">&nbsp; <\/span><span style=\"font-weight: 400;\"># S\u1ed1 nguy\u00ean<\/span>\n<span style=\"font-weight: 400;\">y = <\/span><span style=\"font-weight: 400;\">3.14<\/span><span style=\"font-weight: 400;\">&nbsp; <\/span><span style=\"font-weight: 400;\"># S\u1ed1 th\u1ef1c<\/span>\n<span style=\"font-weight: 400;\">z = <\/span><span style=\"font-weight: 400;\">\"Python\"<\/span><span style=\"font-weight: 400;\">&nbsp; <\/span><span style=\"font-weight: 400;\"># Chu\u1ed7i k\u00fd t\u1ef1<\/span><\/code><\/pre>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e1c ki\u1ec3u d\u1eef li\u1ec7u c\u01a1 b\u1ea3n trong Python bao g\u1ed3m:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>S\u1ed1 nguy\u00ean (int)<\/b><span style=\"font-weight: 400;\">: \u0110\u1ea1i di\u1ec7n cho c\u00e1c s\u1ed1 nguy\u00ean kh\u00f4ng c\u00f3 ph\u1ea7n th\u1eadp ph\u00e2n.<\/span><\/li>\n\n\n\n<li><b>S\u1ed1 th\u1ef1c (float)<\/b><span style=\"font-weight: 400;\">: \u0110\u1ea1i di\u1ec7n cho c\u00e1c s\u1ed1 c\u00f3 ph\u1ea7n th\u1eadp ph\u00e2n.<\/span><\/li>\n\n\n\n<li><b>Chu\u1ed7i k\u00fd t\u1ef1 (str)<\/b><span style=\"font-weight: 400;\">: \u0110\u1ea1i di\u1ec7n cho m\u1ed9t chu\u1ed7i c\u00e1c k\u00fd t\u1ef1 Unicode.<\/span><\/li>\n\n\n\n<li><b>Boolean (bool)<\/b><span style=\"font-weight: 400;\">: \u0110\u1ea1i di\u1ec7n cho hai gi\u00e1 tr\u1ecb True v\u00e0 False.<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, Python c\u00f2n h\u1ed7 tr\u1ee3 c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u ph\u1ee9c t\u1ea1p h\u01a1n nh\u01b0 list, tuple, dictionary, v\u00e0 set, m\u00e0 ch\u00fang ta s\u1ebd t\u00ecm hi\u1ec3u \u1edf ph\u1ea7n sau.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cau-l\u1ec7nh-di\u1ec1u-ki\u1ec7n-s\u1eed-d\u1ee5ng-if-elif-va-else-trong-python\"><b>C\u00e2u L\u1ec7nh \u0110i\u1ec1u Ki\u1ec7n: S\u1eed d\u1ee5ng if, elif, v\u00e0 else trong Python<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Trong l\u1eadp tr\u00ecnh, vi\u1ec7c ki\u1ec3m so\u00e1t lu\u1ed3ng ch\u01b0\u01a1ng tr\u00ecnh d\u1ef1a tr\u00ean c\u00e1c \u0111i\u1ec1u ki\u1ec7n l\u00e0 m\u1ed9t k\u1ef9 n\u0103ng thi\u1ebft y\u1ebfu. Python cho ph\u00e9p b\u1ea1n l\u00e0m \u0111i\u1ec1u n\u00e0y b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng c\u00e1c c\u00e2u l\u1ec7nh if, elif, v\u00e0 else.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">age = <\/span><span style=\"font-weight: 400;\">18<\/span>\n<span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> age &lt; <\/span><span style=\"font-weight: 400;\">18<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">\"B\u1ea1n ch\u01b0a \u0111\u1ee7 tu\u1ed5i \u0111\u1ec3 l\u00e1i xe.\"<\/span><span style=\"font-weight: 400;\">)<\/span>\n<span style=\"font-weight: 400;\">elif<\/span><span style=\"font-weight: 400;\"> age == <\/span><span style=\"font-weight: 400;\">18<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">\"Ch\u00fac m\u1eebng b\u1ea1n v\u1eeba \u0111\u1ee7 tu\u1ed5i \u0111\u1ec3 l\u1ea5y b\u1eb1ng l\u00e1i!\"<\/span><span style=\"font-weight: 400;\">)<\/span>\n<span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">\"B\u1ea1n \u0111\u00e3 c\u00f3 th\u1ec3 l\u00e1i xe t\u1eeb tr\u01b0\u1edbc \u0111\u00f3.\"<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">Ch\u00fac m\u1eebng b\u1ea1n v\u1eeba \u0111\u1ee7 tu\u1ed5i \u0111\u1ec3 l\u1ea5y b\u1eb1ng l\u00e1i!<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">C\u00e2u l\u1ec7nh \u0111i\u1ec1u ki\u1ec7n gi\u00fap ch\u01b0\u01a1ng tr\u00ecnh c\u00f3 kh\u1ea3 n\u0103ng ra quy\u1ebft \u0111\u1ecbnh d\u1ef1a tr\u00ean c\u00e1c \u0111i\u1ec1u ki\u1ec7n c\u1ee5 th\u1ec3, ch\u1eb3ng h\u1ea1n nh\u01b0 tu\u1ed5i c\u1ee7a ng\u01b0\u1eddi d\u00f9ng ho\u1eb7c tr\u1ea1ng th\u00e1i c\u1ee7a m\u1ed9t bi\u1ebfn. \u0110i\u1ec1u n\u00e0y r\u1ea5t quan tr\u1ecdng trong vi\u1ec7c x\u00e2y d\u1ef1ng c\u00e1c \u1ee9ng d\u1ee5ng th\u1ef1c t\u1ebf, t\u1eeb vi\u1ec7c ki\u1ec3m tra \u0111\u1ea7u v\u00e0o c\u1ee7a ng\u01b0\u1eddi d\u00f9ng cho \u0111\u1ebfn \u0111i\u1ec1u h\u01b0\u1edbng logic trong c\u00e1c \u1ee9ng d\u1ee5ng ph\u1ee9c t\u1ea1p.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vong-l\u1eb7p-cach-s\u1eed-d\u1ee5ng-vong-l\u1eb7p-for-va-while\"><b>V\u00f2ng l\u1eb7p: C\u00e1ch s\u1eed d\u1ee5ng v\u00f2ng l\u1eb7p for v\u00e0 while<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u00f2ng l\u1eb7p l\u00e0 c\u00e1ch \u0111\u1ec3 th\u1ef1c hi\u1ec7n m\u1ed9t kh\u1ed1i m\u00e3 nhi\u1ec1u l\u1ea7n. Python cung c\u1ea5p hai lo\u1ea1i v\u00f2ng l\u1eb7p ch\u00ednh: <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> v\u00e0 <\/span><span style=\"font-weight: 400;\">while<\/span><span style=\"font-weight: 400;\">. V\u00f2ng l\u1eb7p <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> th\u01b0\u1eddng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng khi b\u1ea1n bi\u1ebft tr\u01b0\u1edbc s\u1ed1 l\u1ea7n l\u1eb7p:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> i <\/span><span style=\"font-weight: 400;\">in<\/span><span style=\"font-weight: 400;\"> range(<\/span><span style=\"font-weight: 400;\">5<\/span><span style=\"font-weight: 400;\">):<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">f\"L\u1ea7n l\u1eb7p th\u1ee9 <\/span><span style=\"font-weight: 400;\">{i}<\/span><span style=\"font-weight: 400;\">\"<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\">L\u1ea7n l\u1eb7p th\u1ee9 0L\u1ea7n l\u1eb7p th\u1ee9 1L\u1ea7n l\u1eb7p th\u1ee9 2L\u1ea7n l\u1eb7p th\u1ee9 3L\u1ea7n l\u1eb7p th\u1ee9 4<\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">V\u00f2ng l\u1eb7p <\/span><span style=\"font-weight: 400;\">while<\/span><span style=\"font-weight: 400;\"> \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng khi \u0111i\u1ec1u ki\u1ec7n l\u1eb7p ch\u01b0a bi\u1ebft tr\u01b0\u1edbc:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">count = <\/span><span style=\"font-weight: 400;\">0<\/span>\n<span style=\"font-weight: 400;\">while<\/span><span style=\"font-weight: 400;\"> count &lt; <\/span><span style=\"font-weight: 400;\">5<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">f\"\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 <\/span><span style=\"font-weight: 400;\">{count}<\/span><span style=\"font-weight: 400;\">\"<\/span><span style=\"font-weight: 400;\">)<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; count += <\/span><span style=\"font-weight: 400;\">1<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 0\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 1\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 2\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 3\u0110\u00e2y l\u00e0 l\u1ea7n l\u1eb7p th\u1ee9 <\/span><span style=\"font-family: inherit; font-size: inherit;\"> 4<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c hi\u1ec3u r\u00f5 khi n\u00e0o n\u00ean s\u1eed d\u1ee5ng <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> hay <\/span><span style=\"font-weight: 400;\">while<\/span><span style=\"font-weight: 400;\"> s\u1ebd gi\u00fap b\u1ea1n vi\u1ebft m\u00e3 hi\u1ec7u qu\u1ea3 v\u00e0 d\u1ec5 b\u1ea3o tr\u00ec h\u01a1n.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-python-c\u01a1-b\u1ea3n-c\u1ea5u-truc-d\u1eef-li\u1ec7u\"><span class=\"ez-toc-section\" id=\"Code_Python_co_ban_Cau_truc_du_lieu\"><\/span><b>Code Python c\u01a1 b\u1ea3n: C\u1ea5u tr\u00fac d\u1eef li\u1ec7u<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-list-t\u1ea1o-truy-c\u1eadp-va-thao-tac-v\u1edbi-danh-sach\"><b>List: T\u1ea1o, truy c\u1eadp, v\u00e0 thao t\u00e1c v\u1edbi danh s\u00e1ch<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Danh s\u00e1ch (list) l\u00e0 m\u1ed9t trong nh\u1eefng c\u1ea5u tr\u00fac d\u1eef li\u1ec7u quan tr\u1ecdng nh\u1ea5t trong Python, cho ph\u00e9p b\u1ea1n l\u01b0u tr\u1eef m\u1ed9t t\u1eadp h\u1ee3p c\u00e1c m\u1ee5c trong m\u1ed9t bi\u1ebfn duy nh\u1ea5t. V\u00ed d\u1ee5:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">fruits = &#91;<\/span><span style=\"font-weight: 400;\">\"apple\"<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\"banana\"<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\"cherry\"<\/span><span style=\"font-weight: 400;\">]<\/span>\n<span style=\"font-weight: 400;\">print(fruits&#91;<\/span><span style=\"font-weight: 400;\">0<\/span><span style=\"font-weight: 400;\">])&nbsp; <\/span><span style=\"font-weight: 400;\"># Truy c\u1eadp ph\u1ea7n t\u1eed \u0111\u1ea7u ti\u00ean<\/span>\n<span style=\"font-weight: 400;\">fruits.append(<\/span><span style=\"font-weight: 400;\">\"orange\"<\/span><span style=\"font-weight: 400;\">)&nbsp; <\/span><span style=\"font-weight: 400;\"># Th\u00eam ph\u1ea7n t\u1eed m\u1edbi v\u00e0o danh s\u00e1ch<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">apple[&#8216;apple&#8217;, &#8216;banana&#8217;, &#8216;cherry&#8217;, &#8216;orange&#8217;]<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">List c\u00f3 th\u1ec3 ch\u1ee9a c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u kh\u00e1c nhau v\u00e0 c\u00f3 th\u1ec3 thay \u0111\u1ed5i k\u00edch th\u01b0\u1edbc sau khi t\u1ea1o. \u0110\u00e2y l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd \u0111\u1ec3 qu\u1ea3n l\u00fd d\u1eef li\u1ec7u trong c\u00e1c \u1ee9ng d\u1ee5ng Python.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-tuple-cach-s\u1eed-d\u1ee5ng-tuple-va-s\u1ef1-khac-bi\u1ec7t-so-v\u1edbi-list\"><b>Tuple: C\u00e1ch s\u1eed d\u1ee5ng tuple v\u00e0 s\u1ef1 kh\u00e1c bi\u1ec7t so v\u1edbi list<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Tuple l\u00e0 m\u1ed9t lo\u1ea1i danh s\u00e1ch \u0111\u1eb7c bi\u1ec7t kh\u00f4ng thay \u0111\u1ed5i sau khi \u0111\u01b0\u1ee3c t\u1ea1o ra, c\u00f2n g\u1ecdi l\u00e0 immutable. V\u00ed d\u1ee5:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">dimensions = (<\/span><span style=\"font-weight: 400;\">1920<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">1080<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">(1920, 1080)<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">Kh\u00e1c v\u1edbi list, tuple kh\u00f4ng th\u1ec3 thay \u0111\u1ed5i, \u0111i\u1ec1u n\u00e0y gi\u00fap b\u1ea3o v\u1ec7 d\u1eef li\u1ec7u kh\u1ecfi s\u1ef1 thay \u0111\u1ed5i kh\u00f4ng mong mu\u1ed1n, m\u1ed9t t\u00ednh n\u0103ng h\u1eefu \u00edch trong c\u00e1c \u1ee9ng d\u1ee5ng c\u1ea7n s\u1ef1 an to\u00e0n d\u1eef li\u1ec7u.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-set-t\u1ea1o-va-s\u1eed-d\u1ee5ng-t\u1eadp-h\u1ee3p\"><b>Set: T\u1ea1o v\u00e0 s\u1eed d\u1ee5ng t\u1eadp h\u1ee3p<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Set l\u00e0 m\u1ed9t c\u1ea5u tr\u00fac d\u1eef li\u1ec7u l\u01b0u tr\u1eef c\u00e1c gi\u00e1 tr\u1ecb duy nh\u1ea5t, kh\u00f4ng tr\u00f9ng l\u1eb7p v\u00e0 kh\u00f4ng c\u00f3 th\u1ee9 t\u1ef1 c\u1ee5 th\u1ec3. \u0110i\u1ec1u n\u00e0y r\u1ea5t h\u1eefu \u00edch khi b\u1ea1n c\u1ea7n qu\u1ea3n l\u00fd c\u00e1c t\u1eadp h\u1ee3p d\u1eef li\u1ec7u kh\u00f4ng c\u00f3 ph\u1ea7n t\u1eed tr\u00f9ng l\u1eb7p.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">unique_numbers = {<\/span><span style=\"font-weight: 400;\">1<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">2<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">3<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">3<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">4<\/span><span style=\"font-weight: 400;\">}<\/span>\n<span style=\"font-weight: 400;\">print(unique_numbers)&nbsp; <\/span><span style=\"font-weight: 400;\"># K\u1ebft qu\u1ea3: {1, 2, 3, 4}<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">{1, 2, 3, 4}<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">Set c\u0169ng h\u1ed7 tr\u1ee3 c\u00e1c ph\u00e9p to\u00e1n t\u1eadp h\u1ee3p nh\u01b0 h\u1ee3p, giao v\u00e0 hi\u1ec7u, gi\u00fap x\u1eed l\u00fd d\u1eef li\u1ec7u m\u1ed9t c\u00e1ch hi\u1ec7u qu\u1ea3 h\u01a1n.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-dictionary-khai-ni\u1ec7m-t\u1eeb-di\u1ec3n-va-cach-s\u1eed-d\u1ee5ng\"><b>Dictionary: Kh\u00e1i ni\u1ec7m t\u1eeb \u0111i\u1ec3n v\u00e0 c\u00e1ch s\u1eed d\u1ee5ng<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Dictionary l\u00e0 m\u1ed9t c\u1ea5u tr\u00fac d\u1eef li\u1ec7u l\u01b0u tr\u1eef c\u00e1c c\u1eb7p gi\u00e1 tr\u1ecb (key-value). \u0110i\u1ec1u n\u00e0y cho ph\u00e9p b\u1ea1n nhanh ch\u00f3ng tra c\u1ee9u c\u00e1c gi\u00e1 tr\u1ecb d\u1ef1a tr\u00ean m\u1ed9t kh\u00f3a duy nh\u1ea5t.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">student = {<\/span><span style=\"font-weight: 400;\">\"name\"<\/span><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">\"John\"<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\"age\"<\/span><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">21<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\"major\"<\/span><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">\"Computer Science\"<\/span><span style=\"font-weight: 400;\">}<\/span>\n<span style=\"font-weight: 400;\">print(student&#91;<\/span><span style=\"font-weight: 400;\">\"name\"<\/span><span style=\"font-weight: 400;\">])&nbsp; <\/span><span style=\"font-weight: 400;\"># Truy xu\u1ea5t gi\u00e1 tr\u1ecb \"John\"<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">John<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">Dictionary l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 quan tr\u1ecdng trong c\u00e1c \u1ee9ng d\u1ee5ng c\u1ea7n t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u ph\u1ee9c t\u1ea1p v\u00e0 truy c\u1eadp ch\u00fang m\u1ed9t c\u00e1ch hi\u1ec7u qu\u1ea3.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-python-c\u01a1-b\u1ea3n-ham-va-module\"><span class=\"ez-toc-section\" id=\"Code_Python_co_ban_Ham_va_Module\"><\/span><b>Code Python c\u01a1 b\u1ea3n: H\u00e0m v\u00e0 Module<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ham-cach-d\u1ecbnh-nghia-va-g\u1ecdi-ham\"><b>H\u00e0m: C\u00e1ch \u0111\u1ecbnh ngh\u0129a v\u00e0 g\u1ecdi h\u00e0m<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">H\u00e0m l\u00e0 m\u1ed9t c\u00e1ch \u0111\u1ec3 t\u1ed5 ch\u1ee9c m\u00e3 th\u00e0nh c\u00e1c kh\u1ed1i nh\u1ecf h\u01a1n, d\u1ec5 qu\u1ea3n l\u00fd v\u00e0 t\u00e1i s\u1eed d\u1ee5ng. Vi\u1ec7c s\u1eed d\u1ee5ng h\u00e0m kh\u00f4ng ch\u1ec9 gi\u00fap m\u00e3 d\u1ec5 \u0111\u1ecdc h\u01a1n m\u00e0 c\u00f2n l\u00e0m cho n\u00f3 d\u1ec5 b\u1ea3o tr\u00ec v\u00e0 m\u1edf r\u1ed9ng.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">def<\/span><span style=\"font-weight: 400;\"> greet<\/span><span style=\"font-weight: 400;\">(name)<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; <\/span><span style=\"font-weight: 400;\">return<\/span> <span style=\"font-weight: 400;\">f\"Hello, <\/span><span style=\"font-weight: 400;\">{name}<\/span><span style=\"font-weight: 400;\">!\"<\/span>\n\n<span style=\"font-weight: 400;\">print(greet(<\/span><span style=\"font-weight: 400;\">\"Alice\"<\/span><span style=\"font-weight: 400;\">))<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><span style=\"font-weight: 400;\">Hello, Alice!<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">H\u00e0m cho ph\u00e9p b\u1ea1n th\u1ef1c hi\u1ec7n c\u00e1c nhi\u1ec7m v\u1ee5 ph\u1ee9c t\u1ea1p b\u1eb1ng c\u00e1ch chia nh\u1ecf ch\u00fang th\u00e0nh c\u00e1c b\u01b0\u1edbc nh\u1ecf h\u01a1n, gi\u00fap gi\u1ea3m thi\u1ec3u s\u1ef1 l\u1eb7p l\u1ea1i m\u00e3 v\u00e0 t\u1ed1i \u01b0u h\u00f3a hi\u1ec7u su\u1ea5t.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-module-cach-import-module-va-s\u1eed-d\u1ee5ng-cac-ham-t\u1eeb-module\"><b>Module: C\u00e1ch import module v\u00e0 s\u1eed d\u1ee5ng c\u00e1c h\u00e0m t\u1eeb module<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Python c\u00f3 m\u1ed9t h\u1ec7 th\u1ed1ng module m\u1ea1nh m\u1ebd, cho ph\u00e9p b\u1ea1n t\u1ed5 ch\u1ee9c m\u00e3 c\u1ee7a m\u00ecnh th\u00e0nh c\u00e1c t\u1eadp tin ri\u00eang bi\u1ec7t v\u00e0 t\u00e1i s\u1eed d\u1ee5ng ch\u00fang khi c\u1ea7n thi\u1ebft. B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00e1c module c\u00f3 s\u1eb5n nh\u01b0 <\/span><span style=\"font-weight: 400;\">math<\/span><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><span style=\"font-weight: 400;\">datetime<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> math<\/span>\n<span style=\"font-weight: 400;\">print(math.sqrt(<\/span><span style=\"font-weight: 400;\">16<\/span><span style=\"font-weight: 400;\">))<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><span style=\"font-weight: 400;\">4.0<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c s\u1eed d\u1ee5ng module gi\u00fap b\u1ea1n m\u1edf r\u1ed9ng kh\u1ea3 n\u0103ng c\u1ee7a Python v\u00e0 l\u00e0m cho m\u00e3 c\u1ee7a b\u1ea1n d\u1ec5 b\u1ea3o tr\u00ec h\u01a1n, \u0111\u1eb7c bi\u1ec7t l\u00e0 trong c\u00e1c d\u1ef1 \u00e1n l\u1edbn.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-python-c\u01a1-b\u1ea3n-x\u1eed-ly-ngo\u1ea1i-l\u1ec7\"><span class=\"ez-toc-section\" id=\"Code_Python_co_ban_Xu_ly_ngoai_le\"><\/span><b>Code Python c\u01a1 b\u1ea3n: X\u1eed l\u00fd ngo\u1ea1i l\u1ec7<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-try-except-s\u1eed-d\u1ee5ng-kh\u1ed1i-l\u1ec7nh-try-except-d\u1ec3-x\u1eed-ly-l\u1ed7i\"><b>Try\/Except: S\u1eed d\u1ee5ng kh\u1ed1i l\u1ec7nh try\/except \u0111\u1ec3 x\u1eed l\u00fd l\u1ed7i<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Trong qu\u00e1 tr\u00ecnh vi\u1ebft m\u00e3, b\u1ea1n s\u1ebd g\u1eb7p ph\u1ea3i nh\u1eefng t\u00ecnh hu\u1ed1ng m\u00e0 ch\u01b0\u01a1ng tr\u00ecnh c\u00f3 th\u1ec3 g\u00e2y ra l\u1ed7i. Python cung c\u1ea5p kh\u1ed1i l\u1ec7nh <\/span><span style=\"font-weight: 400;\">try\/except<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 x\u1eed l\u00fd nh\u1eefng l\u1ed7i n\u00e0y m\u00e0 kh\u00f4ng l\u00e0m gi\u00e1n \u0111o\u1ea1n ch\u01b0\u01a1ng tr\u00ecnh.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">try<\/span><span style=\"font-weight: 400;\">:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; result = <\/span><span style=\"font-weight: 400;\">10<\/span><span style=\"font-weight: 400;\"> \/ <\/span><span style=\"font-weight: 400;\">0<\/span>\n<span style=\"font-weight: 400;\">except<\/span><span style=\"font-weight: 400;\"> ZeroDivisionError:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; print(<\/span><span style=\"font-weight: 400;\">\"Kh\u00f4ng th\u1ec3 chia cho 0!\"<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><span style=\"font-weight: 400;\">Kh\u00f4ng th\u1ec3 chia cho 0!<\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">X\u1eed l\u00fd ngo\u1ea1i l\u1ec7 gi\u00fap ch\u01b0\u01a1ng tr\u00ecnh c\u1ee7a b\u1ea1n ho\u1ea1t \u0111\u1ed9ng m\u01b0\u1ee3t m\u00e0 h\u01a1n v\u00e0 gi\u1ea3m thi\u1ec3u kh\u1ea3 n\u0103ng b\u1ecb crash trong nh\u1eefng t\u00ecnh hu\u1ed1ng kh\u00f4ng l\u01b0\u1eddng tr\u01b0\u1edbc \u0111\u01b0\u1ee3c.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-cac-l\u1ed7i-th\u01b0\u1eddng-g\u1eb7p-va-cach-x\u1eed-ly\"><b>C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p v\u00e0 c\u00e1ch x\u1eed l\u00fd<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 l\u1ed7i ph\u1ed5 bi\u1ebfn trong Python bao g\u1ed3m <\/span><span style=\"font-weight: 400;\">IndexError<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">KeyError<\/span><span style=\"font-weight: 400;\">, v\u00e0 <\/span><span style=\"font-weight: 400;\">TypeError<\/span><span style=\"font-weight: 400;\">. Hi\u1ec3u v\u00e0 x\u1eed l\u00fd nh\u1eefng l\u1ed7i n\u00e0y m\u1ed9t c\u00e1ch hi\u1ec7u qu\u1ea3 s\u1ebd gi\u00fap b\u1ea1n vi\u1ebft m\u00e3 an to\u00e0n v\u00e0 \u0111\u00e1ng tin c\u1eady h\u01a1n.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-python-c\u01a1-b\u1ea3n-lam-vi\u1ec7c-v\u1edbi-file\"><span class=\"ez-toc-section\" id=\"Code_Python_co_ban_Lam_viec_voi_file\"><\/span><b>Code Python c\u01a1 b\u1ea3n: L\u00e0m vi\u1ec7c v\u1edbi file<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-d\u1ecdc-va-ghi-file-cach-d\u1ecdc-va-ghi-d\u1eef-li\u1ec7u-vao-file\"><b>\u0110\u1ecdc v\u00e0 Ghi File: C\u00e1ch \u0111\u1ecdc v\u00e0 ghi d\u1eef li\u1ec7u v\u00e0o file<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Python cung c\u1ea5p c\u00e1c c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd \u0111\u1ec3 \u0111\u1ecdc v\u00e0 ghi d\u1eef li\u1ec7u v\u00e0o c\u00e1c t\u1eadp tin, cho ph\u00e9p b\u1ea1n l\u00e0m vi\u1ec7c v\u1edbi d\u1eef li\u1ec7u ngo\u00e0i ch\u01b0\u01a1ng tr\u00ecnh c\u1ee7a m\u00ecnh.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">with<\/span><span style=\"font-weight: 400;\"> open(<\/span><span style=\"font-weight: 400;\">\"example.txt\"<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">\"w\"<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">as<\/span><span style=\"font-weight: 400;\"> file:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; file.write(<\/span><span style=\"font-weight: 400;\">\"Hello, world!\"<\/span><span style=\"font-weight: 400;\">)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\">File <\/span><span style=\"font-weight: 400;\">example.txt<\/span><span style=\"font-weight: 400;\"> \u0111\u01b0\u1ee3c t\u1ea1o v\u00e0 ch\u1ee9a n\u1ed9i dung: <\/span><span style=\"font-weight: 400;\">Hello, world!<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c qu\u1ea3n l\u00fd file hi\u1ec7u qu\u1ea3 r\u1ea5t quan tr\u1ecdng trong c\u00e1c \u1ee9ng d\u1ee5ng c\u1ea7n l\u01b0u tr\u1eef v\u00e0 x\u1eed l\u00fd d\u1eef li\u1ec7u l\u1edbn.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-lam-vi\u1ec7c-v\u1edbi-file-csv\"><b>L\u00e0m vi\u1ec7c v\u1edbi file CSV<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">CSV l\u00e0 m\u1ed9t \u0111\u1ecbnh d\u1ea1ng ph\u1ed5 bi\u1ebfn \u0111\u1ec3 l\u01b0u tr\u1eef d\u1eef li\u1ec7u b\u1ea3ng. Python cung c\u1ea5p module <\/span><span style=\"font-weight: 400;\">csv<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi c\u00e1c file CSV m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng.<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> csv<\/span>\n<span style=\"font-weight: 400;\">with<\/span><span style=\"font-weight: 400;\"> open(<\/span><span style=\"font-weight: 400;\">'data.csv'<\/span><span style=\"font-weight: 400;\">, mode=<\/span><span style=\"font-weight: 400;\">'r'<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">as<\/span><span style=\"font-weight: 400;\"> file:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; csv_reader = csv.reader(file)<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> row <\/span><span style=\"font-weight: 400;\">in<\/span><span style=\"font-weight: 400;\"> csv_reader:<\/span>\n<span style=\"font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp; print(row)<\/span><\/code><\/pre>\n\n\n\n<p><b>K\u1ebft qu\u1ea3:<\/b><span style=\"font-weight: 400;\"> (gi\u1ea3 s\u1eed file <\/span><span style=\"font-weight: 400;\">data.csv<\/span><span style=\"font-weight: 400;\"> c\u00f3 n\u1ed9i dung)<\/span><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><p style=\"text-align: left;\"><span style=\"font-weight: 400;\">[&#8216;Name&#8217;, &#8216;Age&#8217;, &#8216;Country&#8217;][&#8216;Alice&#8217;, &#8217;30&#8217;, &#8216;USA&#8217;][&#8216;Bob&#8217;, &#8217;25&#8217;, &#8216;UK&#8217;]<\/span><\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><span style=\"font-weight: 400;\">K\u1ef9 n\u0103ng l\u00e0m vi\u1ec7c v\u1edbi file CSV s\u1ebd gi\u00fap b\u1ea1n x\u1eed l\u00fd d\u1eef li\u1ec7u t\u1eeb c\u00e1c ngu\u1ed3n kh\u00e1c nhau v\u00e0 t\u00edch h\u1ee3p ch\u00fang v\u00e0o c\u00e1c \u1ee9ng d\u1ee5ng c\u1ee7a m\u00ecnh.<\/span><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Tham kh\u1ea3o m\u00f4 t\u1ea3 c\u00f4ng vi\u1ec7c t\u1eeb c\u00e1c v\u1ecb tr\u00ed <strong><a href=\"https:\/\/itviec.com\/it-jobs\/python?utm_medium=anchor_text_mid&amp;utm_source=blog&amp;utm_campaign=viec_lam_python&amp;utm_content=code_python_co_ban\" target=\"_blank\" rel=\"noreferrer noopener\">vi\u1ec7c l\u00e0m Python<\/a><\/strong> trong th\u1ef1c t\u1ebf<\/em><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-th\u1ef1c-hanh-va-bai-t\u1eadp-code-python-c\u01a1-b\u1ea3n\"><span class=\"ez-toc-section\" id=\"Thuc_hanh_va_bai_tap_code_Python_co_ban\"><\/span><b>Th\u1ef1c h\u00e0nh v\u00e0 b\u00e0i t\u1eadp code Python c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 n\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n trong Python, vi\u1ec7c th\u1ef1c h\u00e0nh l\u00e0 kh\u00f4ng th\u1ec3 thi\u1ebfu. Ngo\u00e0i l\u00fd thuy\u1ebft, b\u1ea1n c\u1ea7n \u00e1p d\u1ee5ng nh\u1eefng g\u00ec \u0111\u00e3 h\u1ecdc th\u00f4ng qua c\u00e1c b\u00e0i t\u1eadp th\u1ef1c t\u1ebf. D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t s\u1ed1 trang web n\u1ed5i ti\u1ebfng v\u00e0 uy t\u00edn, cung c\u1ea5p c\u00e1c b\u00e0i t\u1eadp t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao, gi\u00fap b\u1ea1n c\u1ee7ng c\u1ed1 v\u00e0 m\u1edf r\u1ed9ng ki\u1ebfn th\u1ee9c c\u1ee7a m\u00ecnh:<\/span><\/p>\n\n\n\n<p><a href=\"https:\/\/www.w3schools.com\/python\/python_exercises.asp\" target=\"_blank\" rel=\"noopener\"><b>W3Schools Python Exercises<\/b><\/a><span style=\"font-weight: 400;\">:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u0110i\u1ec3m m\u1ea1nh<\/b><span style=\"font-weight: 400;\">: C\u00e1c b\u00e0i t\u1eadp tr\u00ean W3Schools \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf \u0111\u01a1n gi\u1ea3n v\u00e0 d\u1ec5 hi\u1ec3u, ph\u00f9 h\u1ee3p v\u1edbi ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u. M\u1ed7i b\u00e0i t\u1eadp \u0111i k\u00e8m v\u1edbi h\u01b0\u1edbng d\u1eabn c\u1ee5 th\u1ec3, gi\u00fap b\u1ea1n t\u1eebng b\u01b0\u1edbc l\u00e0m quen v\u1edbi c\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n.<\/span><\/li>\n\n\n\n<li><b>\u0110i\u1ec3m y\u1ebfu<\/b><span style=\"font-weight: 400;\">: Ph\u1ea1m vi b\u00e0i t\u1eadp c\u00f2n h\u1ea1n ch\u1ebf, ch\u1ee7 y\u1ebfu t\u1eadp trung v\u00e0o nh\u1eefng kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n, ch\u01b0a \u0111\u1ee7 th\u00e1ch th\u1ee9c cho ng\u01b0\u1eddi h\u1ecdc \u1edf tr\u00ecnh \u0111\u1ed9 trung c\u1ea5p ho\u1eb7c cao c\u1ea5p.<\/span><\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/www.practicepython.org\/\" target=\"_blank\" rel=\"noopener\"><b>PracticePython<\/b><\/a><span style=\"font-weight: 400;\">:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u0110i\u1ec3m m\u1ea1nh<\/b><span style=\"font-weight: 400;\">: Cung c\u1ea5p m\u1ed9t lo\u1ea1t b\u00e0i t\u1eadp th\u1ef1c h\u00e0nh bao g\u1ed3m c\u1ea3 c\u00e1c ch\u1ee7 \u0111\u1ec1 c\u01a1 b\u1ea3n v\u00e0 c\u00e1c v\u1ea5n \u0111\u1ec1 ph\u1ee9c t\u1ea1p h\u01a1n. C\u00e1c b\u00e0i t\u1eadp th\u01b0\u1eddng \u0111i k\u00e8m v\u1edbi gi\u1ea3i th\u00edch chi ti\u1ebft, gi\u00fap b\u1ea1n hi\u1ec3u r\u00f5 logic v\u00e0 t\u01b0 duy l\u1eadp tr\u00ecnh.<\/span><\/li>\n\n\n\n<li><b>\u0110i\u1ec3m y\u1ebfu<\/b><span style=\"font-weight: 400;\">: Giao di\u1ec7n kh\u00e1 \u0111\u01a1n gi\u1ea3n, kh\u00f4ng c\u00f3 h\u1ec7 th\u1ed1ng ki\u1ec3m tra t\u1ef1 \u0111\u1ed9ng, y\u00eau c\u1ea7u b\u1ea1n ph\u1ea3i t\u1ef1 ki\u1ec3m tra k\u1ebft qu\u1ea3.<\/span><\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/www.hackerrank.com\/\" target=\"_blank\" rel=\"noopener\"><b>HackerRank<\/b><\/a><span style=\"font-weight: 400;\">:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u0110i\u1ec3m m\u1ea1nh<\/b><span style=\"font-weight: 400;\">: HackerRank l\u00e0 n\u1ec1n t\u1ea3ng ph\u1ed5 bi\u1ebfn cho c\u00e1c l\u1eadp tr\u00ecnh vi\u00ean mu\u1ed1n n\u00e2ng cao k\u1ef9 n\u0103ng th\u00f4ng qua c\u00e1c th\u1eed th\u00e1ch m\u00e3 h\u00f3a. C\u00e1c b\u00e0i t\u1eadp tr\u00ean HackerRank bao g\u1ed3m nhi\u1ec1u m\u1ee9c \u0111\u1ed9 kh\u00f3, t\u1eeb d\u1ec5 \u0111\u1ebfn r\u1ea5t kh\u00f3, gi\u00fap b\u1ea1n r\u00e8n luy\u1ec7n t\u01b0 duy thu\u1eadt to\u00e1n. Nhi\u1ec1u c\u00f4ng ty l\u1edbn nh\u01b0 Google, Facebook, v\u00e0 Amazon c\u0169ng s\u1eed d\u1ee5ng HackerRank \u0111\u1ec3 \u0111\u00e1nh gi\u00e1 k\u1ef9 n\u0103ng l\u1eadp tr\u00ecnh c\u1ee7a \u1ee9ng vi\u00ean trong qu\u00e1 tr\u00ecnh ph\u1ecfng v\u1ea5n.<\/span><\/li>\n\n\n\n<li><b>\u0110i\u1ec3m y\u1ebfu<\/b><span style=\"font-weight: 400;\">: \u0110\u1ed9 kh\u00f3 t\u0103ng nhanh, \u0111\u00f2i h\u1ecfi b\u1ea1n ph\u1ea3i c\u00f3 ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1eefng ch\u1eafc tr\u01b0\u1edbc khi chuy\u1ec3n sang c\u00e1c th\u1eed th\u00e1ch ph\u1ee9c t\u1ea1p h\u01a1n.<\/span><\/li>\n<\/ul>\n\n\n\n<p><a href=\"https:\/\/leetcode.com\/\" target=\"_blank\" rel=\"noopener\"><b>LeetCode<\/b><\/a><span style=\"font-weight: 400;\">:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\u0110i\u1ec3m m\u1ea1nh<\/b><span style=\"font-weight: 400;\">: LeetCode l\u00e0 m\u1ed9t trong nh\u1eefng trang web h\u00e0ng \u0111\u1ea7u d\u00e0nh cho l\u1eadp tr\u00ecnh vi\u00ean luy\u1ec7n t\u1eadp thu\u1eadt to\u00e1n v\u00e0 chu\u1ea9n b\u1ecb cho c\u00e1c cu\u1ed9c ph\u1ecfng v\u1ea5n k\u1ef9 thu\u1eadt. Trang web cung c\u1ea5p h\u00e0ng ng\u00e0n b\u00e0i t\u1eadp v\u1edbi \u0111\u1ed9 kh\u00f3 kh\u00e1c nhau, c\u00f9ng v\u1edbi c\u00e1c ch\u1ee7 \u0111\u1ec1 t\u1eeb c\u1ea5u tr\u00fac d\u1eef li\u1ec7u, thu\u1eadt to\u00e1n \u0111\u1ebfn t\u1ed1i \u01b0u h\u00f3a m\u00e3. \u0110\u00e2y l\u00e0 n\u1ec1n t\u1ea3ng \u0111\u01b0\u1ee3c nhi\u1ec1u k\u1ef9 s\u01b0 ph\u1ea7n m\u1ec1m t\u1eeb c\u00e1c c\u00f4ng ty l\u1edbn s\u1eed d\u1ee5ng \u0111\u1ec3 luy\u1ec7n t\u1eadp tr\u01b0\u1edbc khi tham gia c\u00e1c bu\u1ed5i ph\u1ecfng v\u1ea5n k\u1ef9 thu\u1eadt.<\/span><\/li>\n\n\n\n<li><b>\u0110i\u1ec3m y\u1ebfu<\/b><span style=\"font-weight: 400;\">: Giao di\u1ec7n kh\u00e1 ph\u1ee9c t\u1ea1p v\u1edbi ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u, c\u00f3 th\u1ec3 d\u1ec5 g\u00e2y cho\u00e1ng ng\u1ee3p n\u1ebfu ch\u01b0a quen v\u1edbi vi\u1ec7c gi\u1ea3i quy\u1ebft c\u00e1c v\u1ea5n \u0111\u1ec1 ph\u1ee9c t\u1ea1p.<\/span><\/li>\n<\/ul>\n\n\n\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n m\u1edbi b\u1eaft \u0111\u1ea7u, h\u00e3y kh\u1edfi \u0111\u1ed9ng v\u1edbi c\u00e1c b\u00e0i t\u1eadp tr\u00ean W3Schools v\u00e0 PracticePython \u0111\u1ec3 l\u00e0m quen v\u1edbi c\u00fa ph\u00e1p v\u00e0 kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n. Sau khi n\u1eafm v\u1eefng n\u1ec1n t\u1ea3ng, b\u1ea1n c\u00f3 th\u1ec3 th\u1eed s\u1ee9c v\u1edbi c\u00e1c b\u00e0i t\u1eadp tr\u00ean HackerRank v\u00e0 LeetCode \u0111\u1ec3 r\u00e8n luy\u1ec7n k\u1ef9 n\u0103ng thu\u1eadt to\u00e1n v\u00e0 chu\u1ea9n b\u1ecb cho c\u00e1c cu\u1ed9c ph\u1ecfng v\u1ea5n k\u1ef9 thu\u1eadt.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c luy\u1ec7n t\u1eadp th\u01b0\u1eddng xuy\u00ean tr\u00ean nh\u1eefng n\u1ec1n t\u1ea3ng n\u00e0y s\u1ebd gi\u00fap b\u1ea1n t\u1ef1 tin h\u01a1n khi \u0111\u1ed1i di\u1ec7n v\u1edbi c\u00e1c th\u1eed th\u00e1ch trong qu\u00e1 tr\u00ecnh l\u00e0m vi\u1ec7c th\u1ef1c t\u1ebf ho\u1eb7c khi tham gia ph\u1ecfng v\u1ea5n t\u1ea1i c\u00e1c c\u00f4ng ty l\u1edbn.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cau-h\u1ecfi-th\u01b0\u1eddng-g\u1eb7p-v\u1ec1-code-python-c\u01a1-b\u1ea3n\"><span class=\"ez-toc-section\" id=\"Cau_hoi_thuong_gap_ve_code_Python_co_ban\"><\/span><b>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 code Python c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-python-co-h\u1ed7-tr\u1ee3-l\u1eadp-trinh-h\u01b0\u1edbng-d\u1ed1i-t\u01b0\u1ee3ng-khong\"><b>Python c\u00f3 h\u1ed7 tr\u1ee3 l\u1eadp tr\u00ecnh h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng kh\u00f4ng?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Python h\u1ed7 tr\u1ee3 ho\u00e0n to\u00e0n l\u1eadp tr\u00ecnh h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng (<a href=\"https:\/\/itviec.com\/blog\/oop-la-gi\/\" target=\"_blank\" rel=\"noopener\">OOP<\/a>), cho ph\u00e9p b\u1ea1n \u0111\u1ecbnh ngh\u0129a l\u1edbp, k\u1ebf th\u1eeba, v\u00e0 \u0111a h\u00ecnh. \u0110\u00e2y l\u00e0 m\u1ed9t kh\u00e1i ni\u1ec7m quan tr\u1ecdng trong vi\u1ec7c x\u00e2y d\u1ef1ng c\u00e1c \u1ee9ng d\u1ee5ng l\u1edbn v\u00e0 c\u00f3 th\u1ec3 m\u1edf r\u1ed9ng.<\/span><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>\u0110\u1ecdc th\u00eam: <a href=\"https:\/\/itviec.com\/blog\/python-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Python l\u00e0 g\u00ec: T\u1ed5ng quan \u0111\u1ecbnh ngh\u0129a, C\u00fa ph\u00e1p v\u00e0 Th\u01b0 vi\u1ec7n Python<\/strong><\/a><\/em><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-s\u1ef1-khac-bi\u1ec7t-gi\u1eefa-list-va-tuple-la-gi\"><b>S\u1ef1 kh\u00e1c bi\u1ec7t gi\u1eefa list v\u00e0 tuple l\u00e0 g\u00ec?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">List l\u00e0 mutable (c\u00f3 th\u1ec3 thay \u0111\u1ed5i), trong khi tuple l\u00e0 immutable (kh\u00f4ng th\u1ec3 thay \u0111\u1ed5i). \u0110i\u1ec1u n\u00e0y l\u00e0m cho tuple tr\u1edf n\u00ean an to\u00e0n h\u01a1n khi b\u1ea1n c\u1ea7n l\u01b0u tr\u1eef d\u1eef li\u1ec7u c\u1ed1 \u0111\u1ecbnh v\u00e0 kh\u00f4ng mu\u1ed1n thay \u0111\u1ed5i ch\u00fang.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-lam-th\u1ebf-nao-d\u1ec3-x\u1eed-ly-l\u1ed7i-th\u01b0\u1eddng-g\u1eb7p-trong-python\"><b>L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 x\u1eed l\u00fd l\u1ed7i th\u01b0\u1eddng g\u1eb7p trong Python?<\/b><\/h3>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c s\u1eed d\u1ee5ng kh\u1ed1i l\u1ec7nh <\/span><span style=\"font-weight: 400;\">try\/except<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 x\u1eed l\u00fd l\u1ed7i l\u00e0 m\u1ed9t c\u00e1ch t\u1ed1t \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o ch\u01b0\u01a1ng tr\u00ecnh c\u1ee7a b\u1ea1n ho\u1ea1t \u0111\u1ed9ng m\u01b0\u1ee3t m\u00e0. \u0110\u1ed1i v\u1edbi c\u00e1c l\u1ed7i c\u1ee5 th\u1ec3 nh\u01b0 <\/span><span style=\"font-weight: 400;\">IndexError<\/span><span style=\"font-weight: 400;\"> ho\u1eb7c <\/span><span style=\"font-weight: 400;\">KeyError<\/span><span style=\"font-weight: 400;\">, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00e1c bi\u1ec7n ph\u00e1p ki\u1ec3m tra tr\u01b0\u1edbc khi truy c\u1eadp d\u1eef li\u1ec7u.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-t\u1ed5ng-k\u1ebft-code-python-c\u01a1-b\u1ea3n\"><span class=\"ez-toc-section\" id=\"Tong_ket_code_Python_co_ban\"><\/span><b>T\u1ed5ng k\u1ebft code Python c\u01a1 b\u1ea3n<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n b\u1ecf qua n\u1ec1n t\u1ea3ng, vi\u1ec7c \u0111\u1ed1i m\u1eb7t v\u1edbi nh\u1eefng th\u00e1ch th\u1ee9c trong c\u00e1c d\u1ef1 \u00e1n ph\u1ee9c t\u1ea1p l\u00e0 \u0111i\u1ec1u kh\u00f3 tr\u00e1nh kh\u1ecfi. \u0110\u00e3 bao gi\u1edd b\u1ea1n th\u1eed vi\u1ebft m\u1ed9t \u0111o\u1ea1n m\u00e3 \u0111\u01a1n gi\u1ea3n, nh\u01b0ng khi tri\u1ec3n khai v\u00e0o th\u1ef1c t\u1ebf l\u1ea1i g\u1eb7p v\u00f4 v\u00e0n l\u1ed7i kh\u00f4ng? \u0110\u00f3 l\u00e0 d\u1ea5u hi\u1ec7u cho th\u1ea5y b\u1ea1n ch\u01b0a hi\u1ec3u r\u00f5 c\u00e1c kh\u00e1i ni\u1ec7m c\u1ed1t l\u00f5i nh\u01b0 bi\u1ebfn, ki\u1ec3u d\u1eef li\u1ec7u, v\u00f2ng l\u1eb7p, hay c\u00e2u l\u1ec7nh \u0111i\u1ec1u ki\u1ec7n. H\u1ecdc Python c\u0169ng gi\u1ed1ng nh\u01b0 x\u00e2y d\u1ef1ng m\u1ed9t ng\u00f4i nh\u00e0: n\u1ebfu n\u1ec1n m\u00f3ng kh\u00f4ng ch\u1eafc, c\u00f4ng tr\u00ecnh s\u1ebd kh\u00f3 l\u00f2ng v\u1eefng b\u1ec1n tr\u01b0\u1edbc nh\u1eefng th\u1eed th\u00e1ch l\u1edbn.<\/span><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c n\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m c\u01a1 b\u1ea3n trong Python kh\u00f4ng ch\u1ec9 l\u00e0 b\u01b0\u1edbc \u0111\u1ec7m m\u00e0 c\u00f2n l\u00e0 n\u1ec1n t\u1ea3ng v\u1eefng ch\u1eafc cho s\u1ef1 nghi\u1ec7p l\u1eadp tr\u00ecnh c\u1ee7a b\u1ea1n. D\u00f9 b\u1ea1n \u0111ang ph\u00e1t tri\u1ec3n nh\u1eefng d\u1ef1 \u00e1n nh\u1ecf hay x\u00e2y d\u1ef1ng c\u00e1c h\u1ec7 th\u1ed1ng ph\u1ee9c t\u1ea1p, hi\u1ec3u r\u00f5 v\u00e0 \u00e1p d\u1ee5ng ch\u00ednh x\u00e1c c\u00e1c nguy\u00ean t\u1eafc c\u01a1 b\u1ea3n n\u00e0y s\u1ebd gi\u00fap b\u1ea1n vi\u1ebft m\u00e3 hi\u1ec7u qu\u1ea3, d\u1ec5 b\u1ea3o tr\u00ec v\u00e0 t\u1ef1 tin \u0111\u1ed1i m\u1eb7t v\u1edbi m\u1ecdi th\u00e1ch th\u1ee9c. H\u00e3y nh\u1edb r\u1eb1ng, m\u1ed9t n\u1ec1n t\u1ea3ng v\u1eefng ch\u1eafc l\u00e0 ch\u00eca kh\u00f3a \u0111\u1ec3 ti\u1ebfn xa h\u01a1n trong h\u00e0nh tr\u00ecnh tr\u1edf th\u00e0nh m\u1ed9t l\u1eadp tr\u00ecnh vi\u00ean Python chuy\u00ean nghi\u1ec7p.<\/span><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Tham kh\u1ea3o <strong><a href=\"https:\/\/itviec.com\/it-jobs\/python?utm_medium=anchor_text_low&amp;utm_source=blog&amp;utm_campaign=viec_lam_python&amp;utm_content=code_python_co_ban\" target=\"_blank\" rel=\"noreferrer noopener\">vi\u1ec7c l\u00e0m Python<\/a><\/strong> to\u00e0n qu\u1ed1c<\/em><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Python hi\u1ec7n nay kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ph\u1ed5 bi\u1ebfn m\u00e0 c\u00f2n l\u00e0 l\u1ef1a ch\u1ecdn h\u00e0ng \u0111\u1ea7u c\u1ee7a nhi\u1ec1u l\u1eadp tr\u00ecnh vi\u00ean t\u1eeb c\u00e1c l\u0129nh v\u1ef1c kh\u00e1c nhau nh\u01b0 ph\u00e1t tri\u1ec3n web, khoa h\u1ecdc d\u1eef li\u1ec7u, tr\u00ed tu\u1ec7 nh\u00e2n t\u1ea1o, v\u00e0 t\u1ef1 \u0111\u1ed9ng h\u00f3a. S\u1ee9c m\u1ea1nh v\u00e0 t\u00ednh linh ho\u1ea1t c\u1ee7a Python [&hellip;]<\/p>\n","protected":false},"author":222,"featured_media":78896,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-78515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n - ITviec Blog<\/title>\n<meta name=\"description\" content=\"N\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m code Python c\u01a1 b\u1ea3n qua c\u00e1ch vi\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n, c\u1ea5u tr\u00fac d\u1eef li\u1ec7u, h\u00e0m v\u00e0 module, x\u1eed l\u00fd ngo\u1ea1i l\u1ec7,...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n\" \/>\n<meta property=\"og:description\" content=\"Python hi\u1ec7n nay kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ph\u1ed5 bi\u1ebfn m\u00e0 c\u00f2n l\u00e0 l\u1ef1a ch\u1ecdn h\u00e0ng \u0111\u1ea7u c\u1ee7a nhi\u1ec1u l\u1eadp tr\u00ecnh vi\u00ean t\u1eeb c\u00e1c l\u0129nh v\u1ef1c kh\u00e1c nhau nh\u01b0 ph\u00e1t tri\u1ec3n\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/code-python-co-ban\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-20T08:55:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-27T16:14:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"790\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nguy\u1ec5n H\u1eefu V\u0103n\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nguy\u1ec5n H\u1eefu V\u0103n\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n - ITviec Blog","description":"N\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m code Python c\u01a1 b\u1ea3n qua c\u00e1ch vi\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n, c\u1ea5u tr\u00fac d\u1eef li\u1ec7u, h\u00e0m v\u00e0 module, x\u1eed l\u00fd ngo\u1ea1i l\u1ec7,...","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:\/\/itviec.com\/blog\/code-python-co-ban\/","og_locale":"vi_VN","og_type":"article","og_title":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n","og_description":"Python hi\u1ec7n nay kh\u00f4ng ch\u1ec9 l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ph\u1ed5 bi\u1ebfn m\u00e0 c\u00f2n l\u00e0 l\u1ef1a ch\u1ecdn h\u00e0ng \u0111\u1ea7u c\u1ee7a nhi\u1ec1u l\u1eadp tr\u00ecnh vi\u00ean t\u1eeb c\u00e1c l\u0129nh v\u1ef1c kh\u00e1c nhau nh\u01b0 ph\u00e1t tri\u1ec3n","og_url":"https:\/\/itviec.com\/blog\/code-python-co-ban\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2024-09-20T08:55:06+00:00","article_modified_time":"2025-09-27T16:14:58+00:00","og_image":[{"width":1500,"height":790,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg","type":"image\/jpeg"}],"author":"Nguy\u1ec5n H\u1eefu V\u0103n","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Nguy\u1ec5n H\u1eefu V\u0103n","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"14 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/"},"author":{"name":"Nguy\u1ec5n H\u1eefu V\u0103n","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/a77cc13f89eaa58f59d8772448febe5f"},"headline":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n","datePublished":"2024-09-20T08:55:06+00:00","dateModified":"2025-09-27T16:14:58+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/"},"wordCount":3777,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/","url":"https:\/\/itviec.com\/blog\/code-python-co-ban\/","name":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg","datePublished":"2024-09-20T08:55:06+00:00","dateModified":"2025-09-27T16:14:58+00:00","description":"N\u1eafm v\u1eefng c\u00e1c kh\u00e1i ni\u1ec7m code Python c\u01a1 b\u1ea3n qua c\u00e1ch vi\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n, c\u1ea5u tr\u00fac d\u1eef li\u1ec7u, h\u00e0m v\u00e0 module, x\u1eed l\u00fd ngo\u1ea1i l\u1ec7,...","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/code-python-co-ban\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/09\/code-Python-co-ban-vippro.jpg","width":1500,"height":790,"caption":"code Python co\u031b ba\u0309n - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/code-python-co-ban\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"Code Python c\u01a1 b\u1ea3n: H\u01b0\u1edbng d\u1eabn chi ti\u1ebft c\u00e1c l\u1ec7nh Python c\u01a1 b\u1ea3n"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/a77cc13f89eaa58f59d8772448febe5f","name":"Nguy\u1ec5n H\u1eefu V\u0103n","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/TR-Nguyen-Huu-Van-vippro-e1712136004193-100x100.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/TR-Nguyen-Huu-Van-vippro-e1712136004193-100x100.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/TR-Nguyen-Huu-Van-vippro-e1712136004193-100x100.jpg","caption":"Nguy\u1ec5n H\u1eefu V\u0103n"},"url":"https:\/\/itviec.com\/blog\/author\/nguyen-huu-van-2\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/78515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/222"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=78515"}],"version-history":[{"count":2,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/78515\/revisions"}],"predecessor-version":[{"id":91720,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/78515\/revisions\/91720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/78896"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=78515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=78515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=78515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}