Hướng dẫn dùng definition with python

Hướng dẫn sử dụng def trong python. Bạn sẽ học được cách sử dụng def để khai báo hàm trong python, cũng như cách gọi hàm trong python đã được khai báo sau bài học này.

def trong python

def trong python là một từ khóa (keyword) dùng để xác định một hàm. Chúng ta sử dụng def khi khai báo hàm trong python.

Hướng dẫn dùng definition with python

Trong bài viết Hàm trong Python bạn đã biết có 3 loại hàm trong python, trong đó có một loại hàm mà chúng ta có thể tự tạo hàm để sử dụng trong chương trình, đó
chính là hàm Python do người dùng định nghĩa.

Khi muốn sử dụng một hàm Python do người dùng định nghĩa, trước hết chúng ta cần khai báo hàm trong python bằng cách sử dụng def trong python với cú pháp hàm như sau:

def tên hàm (tham số 1, tham số 2, ...) :
    Câu lệnh 1 trong hàm
    Câu lệnh 2 trong hàm
    ...

    return giá trị trả về

Trong
đó:

  • def là từ khóa dùng để khai báo hàm trong Python
  • tên hàm là một chuỗi ký tự dùng để đặt tên đại diện cho hàm.
  • tham số là các biến sử dụng trong khai báo hàm, cũng như để nhập đối số khi chúng ta sử dụng hàm.
  • return là từ khóa dùng để trả giá trị trả về từ hàm trong Python

Ví dụ, chúng ta sử dụng def để tạo ra một hàm tính tổng hai số và trả về kết quả trong chương trình như sau:

def add(a, b):
x = a + b
return x

Lại nữa, nếu một hàm không cần nhận giá trị
truyền vào từ bên ngoài thì chúng ta cũng có thể lược bỏ tham số khi khai báo hàm trong python như sau:

def tên hàm () :
    Câu lệnh 1 trong hàm
    Câu lệnh 2 trong hàm
    …

    return giá trị trả về

Như ở ví dụ sau đây, chúng ta không sử dụng tham số khi khai báo hàm:

def add():
x = 1 + 2
print(x)
return x

Cuối cùng, return là lệnh dùng để trả về giá trị trong python, và hàm chứa lệnh return được gọi
hàm trả về giá trị trong python. Tuy nhiên nếu trong trường hợp không có giá trị nào cần trả về từ hàm thì chúng ta cũng có thể bỏ qua lệnh này. Ví dụ:

def hello():
print('Hello')

Gọi hàm trong python

Sau khi khai báo hàm trong python, chúng ta có thể sử dụng hàm đó nhiều lần trong chương trình bằng cách gọi hàm trong python với cú pháp sau đây:

tên hàm ( đối số 1, đối số 2,...)

Chúng ta viết tên hàm, sau đó đặt các đối số
(các giá trị truyền vào khi gọi hàm) ở giữa cặp dấu ngoặc đơn () và cách nhau bởi dấu phẩy ,. Các giá trị của đối số sẽ được dùng để truyền tham số trong python.

Ví dụ, chúng ta khai báo và gọi hàm trong python như sau:

def add(a, b):
x = a + b
return(x)

add(1, 2)
add(5, 6)

Lưu ý, chúng ta gọi các biến dùng để khai báo hàm là tham số, còn các giá trị thực truyền vào khi gọi hàm là đối số. Giá trị của các đối số sẽ được các tham số tương ứng nhận và thực hiện các xử lý ở bên trong
hàm.
Việc các tham số bên trong hàm nhận các đối số từ bên ngoài hàm được gọi là truyền tham số trong Python. Chi tiết về tham số và đối số trong python bạn có thể xem tại bài viết Hàm trong Python

Sau khi gọi hàm trong python, một giá trị là kết quả của hàm sẽ được trả về. Giá trị trả về từ hàm có thể được gán vào biến để sử dụng như sau:

def add(a, b):
x = a + b
return(x)

ketqua = add(1, 2)
print(ketqua)

Trong trường hợp trong hàm được khai báo không chứa
tham số, chúng ta cũng không thể truyền tham số vào hàm được. Khi đó chúng ta sẽ chỉ gọi hàm trong python bằng cách lược bỏ đối số đi như sau:

tên hàm ()

Ví dụ:

def hello():
print('Hello')

hello()

Lại nữa, nếu như trong hàm đã khai báo không phải là hàm trả về giá trị trong python, có nghĩa là nó không chứa câu lệnh trả về giá trị return bên trong hàm, thì về mặc định, giá trị None sẽ được trả về. Ví dụ:

def sample():
x = 1 + 2

a = sample()
print(a)

Lưu ý cuối cùng khi gọi hàm trong python, nếu như bạn gọi một hàm mà
hàm đó vốn chưa được khai báo, lỗi NameError sau đây sẽ xảy ra:

sample2()

>>Traceback (most recent call last):
>> File "Main.py", line 1, in <module>
>> sample2()
>>NameError: name 'sample2' is not defined

Tổng kết

Trên đây Kiyoshi đã hướng dẫn bạn về cách khai báo hàm bằng def trong python, cũng như cách gọi hàm trong python rồi. Để nắm rõ nội dung bài học hơn, bạn hãy thực hành viết lại các ví dụ của ngày hôm nay nhé.

Và hãy cùng tìm hiểu những kiến thức sâu hơn về python trong các bài học tiếp theo.

Viết bởi Kiyoshi. Đã đăng
ký bản quyền tác giả tại &lt;a title=”Bạn được tự do chia sẻ bài viết nhưng phải để lại đường link bài viết từ laptrinhcanban.com. Bạn không được sử dụng tài liệu cho mục đích thương mại. Không được phép chỉnh sửa nội dung được phát hành trên website của chúng tôi” style=”color:#fff;background-color:silver” rel=”license noopener” target=”_blank” href=”https://creativecommons.org/licenses/by-nc-nd/4.0/”&gt;Creativecommons&lt;/a&gt;&amp;nbsp;và &lt;a title=”Bạn được tự
do chia sẻ bài viết nhưng phải để lại đường link bài viết từ laptrinhcanban.com. Bạn không được sử dụng tài liệu cho mục đích thương mại. Không được phép chỉnh sửa nội dung được phát hành trên website của chúng tôi” style=”color:#fff;background-color:silver” target=”_blank” rel=”noopener” href=”https://www.dmca.com/Protection/Status.aspx?ID=1631afcd-7c4a-467d-8016-402c5073e5cd” class=”dmca-badge”&gt;DMCA&lt;/a&gt;&lt;script
src=”https://images.dmca.com/Badges/DMCABadgeHelper.min.js”&gt;&lt;/script&gt;&lt;/p&gt;&lt;h3 style=”font-size:15px”&gt;Bài viết liên quan&lt;/h3&gt;&lt;ul class=”popular-posts”&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/float-trong-python/” title=”Hàm float() trong Python”
rel=”bookmark”&gt;Hàm float() trong Python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-trong-python-la-gi/” title=”Hàm trong Python là gì – Các hàm trong Python” rel=”bookmark”&gt;Hàm trong Python là gì – Các hàm trong Python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li
class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/len-trong-python/” title=”Hàm len() trong Python” rel=”bookmark”&gt;Hàm len() trong Python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a
target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/range-trong-python/” title=”Hàm range() trong Python” rel=”bookmark”&gt;Hàm range() trong Python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/int-trong-python/” title=”Hàm int() trong python” rel=”bookmark”&gt;Hàm int() trong python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/return-trong-python/”
title=”Return trong python và giá trị trả về” rel=”bookmark”&gt;Return trong python và giá trị trả về&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/str-trong-python/” title=”Hàm str() trong python” rel=”bookmark”&gt;Hàm str() trong python&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;li
class=”popular-posts-item”&gt;&lt;div class=”popular-posts-title”&gt;&lt;h3&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/bien-trong-python/bien-trong-python-la-gi/” title=”Biến trong python là gì” rel=”bookmark”&gt;Biến trong python là gì&lt;/a&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div id=”keugoi”&gt;&lt;span&gt;Hãy chia sẻ và cùng
lan tỏa kiến thức lập trình Nhật Bản tại Việt Nam!&lt;/span&gt;&lt;/div&gt;&lt;section class=”icon-bar-2″ style=”border-bottom:dotted grey .3px!important”&gt;&lt;a target=”_blank” title=”chia sẻ qua facebook” rel=”noopener noreferrer” href=”https://www.facebook.com/sharer/sharer.php?u=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” class=”facebook”&gt;&lt;i class=”fa fa-facebook”&gt;&lt;/i&gt;&lt;/a&gt;
&lt;a target=”_blank” rel=”noopener noreferrer” href=”https://twitter.com/intent/tweet?url=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” title=”chia sẻ qua twitter” class=”twitter”&gt;&lt;i class=”fa fa-twitter”&gt;&lt;/i&gt;&lt;/a&gt; &lt;a target=”_blank” rel=”noopener noreferrer”
href=”https://getpocket.com/edit?url=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” title=”chia sẻ qua pocket” class=”pocket”&gt;&lt;i class=”fa fa-get-pocket”&gt;&lt;/i&gt;&lt;/a&gt; &lt;span class=”zalo-share-button” title=”chia sẻ qua zalo” style=”margin-left:18px;margin-bottom:-3px” data-href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/”
data-oaid=”579745863508352884″ data-layout=”3″ data-color=”blue” data-customize=”false”&gt;&lt;/span&gt;&lt;/section&gt;&lt;p class=”ico-folder”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/”&gt;&lt;span itemprop=”HOME”&gt;HOME&lt;/span&gt;&lt;/a&gt;&lt;span class=”sya”&gt;&lt;/span&gt;&amp;gt;&amp;gt; &lt;a target=”_blank” class=”article-category-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/”&gt;python cơ bản – lập trình python cho người mới bắt đầu&lt;/a&gt;&amp;gt;&amp;gt;&lt;a target=”_blank” class=”article-category-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/”&gt;14. hàm trong python&lt;/a&gt;&lt;/p&gt;&lt;nav id=”article-nav”&gt;&lt;a target=”_blank”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-trong-python-la-gi/” id=”article-nav-older” class=”article-nav-link-wrap” style=”float:left;text-align:right;padding-right:20px”&gt;&lt;strong class=”article-nav-caption”&gt;Bài sau&lt;/strong&gt;&lt;div class=”article-nav-title”&gt;Hàm trong Python là gì – Các hàm trong Python&lt;/div&gt;&lt;/a&gt;&lt;a target=”_blank”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/return-trong-python/” id=”article-nav-newer” class=”article-nav-link-wrap” style=”float:right;text-align:left;padding-left:20px”&gt;&lt;strong class=”article-nav-caption”&gt;Bài tiếp&lt;/strong&gt;&lt;div class=”article-nav-title”&gt;Return trong python và giá trị trả về&lt;/div&gt;&lt;/a&gt;&lt;span id=”ezoic-pub-ad-placeholder-611″ class=”ezoic-adpicker-ad”&gt;&lt;/span&gt;&lt;/nav&gt;&lt;div
id=”recent_posts_down”&gt;&lt;div class=”widget_athemes_tabs”&gt;&lt;ul id=”widget-tab” class=”clearfix widget-tab-nav”&gt;&lt;li class=”active”&gt;Bài viết mới nhất&lt;/li&gt;&lt;/ul&gt;&lt;div class=”widget”&gt;&lt;ul&gt;&lt;li class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/lam-tron-so-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban46.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div
class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/lam-tron-so-trong-javascript/”&gt;Làm tròn số trong JavaScript (Math.round, Math.ceil, Math.floor)&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”clearfix”&gt;&lt;div
class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/so-mu-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban45.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div
class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/so-mu-trong-javascript/”&gt;Số mũ trong JavaScript (Math.pow, Math.exp)&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a
target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-max-math-min-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban44.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div
class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-max-math-min-trong-javascript/”&gt;Math.max và Math.min trong JavaScript&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”clearfix”&gt;&lt;div
class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-random-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban43.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=””
importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-random-trong-javascript/”&gt;Math.random trong JavaScript&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li
class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/throw-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban42.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″
loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/throw-trong-javascript/”&gt;throw trong JavaScript và cách trả về ngoại lệ tuỳ ý&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li
class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/cac-ngoai-le-trong-javascript-va-cach-xu-ly/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban41.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2
src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/cac-ngoai-le-trong-javascript-va-cach-xu-ly/”&gt;Các ngoại lệ trong JavaScript và cách xử lý tương ứng&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1,
2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/try-catch-trong-javascript/”&gt;&lt;img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban40.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small
size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/try-catch-trong-javascript/”&gt;try…catch trong JavaScript và cách xử lý ngoại lệ&lt;/a&gt;&lt;/span&gt;
&lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=”clearfix”&gt;&lt;div class=”widget-entry-thumbnail”&gt;&lt;a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/xu-ly-ngoai-le-cua-ham-xu-ly-mo-ta-trong-khoi-try/”&gt;&lt;img width=”60px” height=”60px”
src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban39.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=”widget-entry-summary”&gt;&lt;span style=”margin:0″&gt;&lt;a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/xu-ly-ngoai-le-cua-ham-xu-ly-mo-ta-trong-khoi-try/”&gt;Xử lý ngoại lệ của hàm xử lý mô tả trong khối try&lt;/a&gt;&lt;/span&gt; &lt;span&gt;tháng 7 1, 2022&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;footer class=”entry-meta entry-footer”&gt;&lt;/footer&gt;&lt;hr
class=”entry-footer-hr”&gt;&lt;/div&gt;&lt;span class=”ezoic-autoinsert-ad ezoic-longest_content”&gt;&lt;/span&gt;&lt;div id=”profiletitle2″&gt;Profile&lt;/div&gt;&lt;div id=”profileblock2″&gt;&lt;div id=”profilephoto2″&gt;&lt;a target=”_blank” rel=”noopener” href=”https://www.facebook.com/mr.nchita”&gt;&lt;img src=”https://laptrinhcanban.com/css/images/kiyoshi.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ width=”100″ height=”100″
alt=”きよしです!笑” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id=”profiletext2″&gt;&lt;p&gt;Tác giả : &lt;a href=”https://www.facebook.com/mr.nchita” target=”_blank” rel=”nofollow noopener”&gt;Kiyoshi (Chis Thanh)&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Kiyoshi là một &lt;a href=”https://www.youtube.com/c/ChisThanh” target=”_blank” rel=”nofollow noopener”&gt;cựu du học
sinh tại Nhật Bản&lt;/a&gt;. Sau khi tốt nghiệp đại học Toyama năm 2017, Kiyoshi hiện đang làm BrSE tại Tokyo, Nhật Bản.&lt;span id=”ezoic-pub-ad-placeholder-196″ class=”ezoic-adpicker-ad”&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/article&gt;&lt;aside id=”sidebar”&gt;&lt;div id=”sidebar_first”&gt;&lt;span class=”ezoic-autoinsert-ad ezoic-sidebar”&gt;&lt;/span&gt;&lt;div
class=”search” style=”margin-top:-30px”&gt;&lt;div id=”fb-root”&gt;&lt;/div&gt;&lt;script async defer crossorigin=”anonymous” src=”https://connect.facebook.net/vi_VN/sdk.js#xfbml=1&amp;version=v12.0&amp;appId=3084959888222500&amp;autoLogAppEvents=1″ nonce=”KPkvxeh4″&gt;&lt;/script&gt;&lt;div class=”fb-page” style=”margin-left:30px” data-href=”https://www.facebook.com/laptrinhkiyoshi” data-width=”380″ data-hide-cover=”false”
data-show-facepile=”false”&gt;&lt;/div&gt;&lt;script async src=”https://cse.google.com/cse.js?cx=8a4ac28a22903209e”&gt;&lt;/script&gt;&lt;div class=”gcse-search”&gt;&lt;/div&gt;&lt;/div&gt;&lt;span id=”ezoic-pub-ad-placeholder-145″&gt;&lt;/span&gt;&lt;span class=”ezoic-ad ezoic-at-0 box-1 box-1145 adtester-container adtester-container-145 ezoic-ad-adaptive” data-ez-name=”laptrinhcanban_com-box-1″&gt;&lt;span
class=”ezoic-ad box-1 box-1-multi-145 adtester-container adtester-container-145″ data-ez-name=”laptrinhcanban_com-box-1″&gt;&lt;span id=”div-gpt-ad-laptrinhcanban_com-box-1-0″ ezaw=”300″ ezah=”262″ style=”position:relative;z-index:0;display:inline-block;padding:0;min-height:262px;min-width:300px” class=”ezoic-ad”&gt;&lt;script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”&gt;if(typeof ez_ad_units !=
‘undefined’){ez_ad_units.push([[300,250],’laptrinhcanban_com-box-1′,’ezslot_5′,145,’0′,’0′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-box-1-0’)};&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=”ezoic-ad box-1 box-1-multi-145 adtester-container adtester-container-145″ data-ez-name=”laptrinhcanban_com-box-1″&gt;&lt;span id=”div-gpt-ad-laptrinhcanban_com-box-1-0_1″ ezaw=”300″ ezah=”262″
style=”position:relative;z-index:0;display:inline-block;padding:0;min-height:262px;min-width:300px” class=”ezoic-ad”&gt;&lt;script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”&gt;if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[300,250],’laptrinhcanban_com-box-1′,’ezslot_6′,145,’0′,’1′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-box-1-0_1’)};&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;span
class=”ezoic-ad box-1 box-1-multi-145 adtester-container adtester-container-145″ data-ez-name=”laptrinhcanban_com-box-1″&gt;&lt;span id=”div-gpt-ad-laptrinhcanban_com-box-1-0_2″ ezaw=”300″ ezah=”262″ style=”position:relative;z-index:0;display:inline-block;padding:0;min-height:262px;min-width:300px” class=”ezoic-ad”&gt;&lt;script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”&gt;if(typeof ez_ad_units !=
‘undefined’){ez_ad_units.push([[300,250],’laptrinhcanban_com-box-1′,’ezslot_7′,145,’0′,’2′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-box-1-0_2’)};&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=”ezoic-ad box-1 box-1-multi-145 adtester-container adtester-container-145″ data-ez-name=”laptrinhcanban_com-box-1″&gt;&lt;span id=”div-gpt-ad-laptrinhcanban_com-box-1-0_3″ ezaw=”300″ ezah=”262″
style=”position:relative;z-index:0;display:inline-block;padding:0;min-height:262px;min-width:300px” class=”ezoic-ad”&gt;&lt;script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”&gt;if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[300,250],’laptrinhcanban_com-box-1′,’ezslot_8′,145,’0′,’3′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-box-1-0_3’)};&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;style&gt;
.box-1-multi-145{border:none!important;display:inline-block;float:none!important;line-height:0px;margin-bottom:3px!important;margin-left:0px!important;margin-right:0px!important;margin-top:3px!important;max-width:100%!important;min-height:250px;min-width:300px;padding:0;}</p><div class=”widget_athemes_tabs”><ul id=”widget-tab” class=”clearfix widget-tab-nav”><li class=”active”>Bài viết mới nhất</li></ul><div class=”widget”><ul><li
class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/lam-tron-so-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban46.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=””
importance=”high”></a></div><div class=”widget-entry-summary”><span style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/lam-tron-so-trong-javascript/”>Làm tròn số trong JavaScript (Math.round, Math.ceil, Math.floor)</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a
target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/so-mu-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban45.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div
class=”widget-entry-summary”><span style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/so-mu-trong-javascript/”>Số mũ trong JavaScript (Math.pow, Math.exp)</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-max-math-min-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban44.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div
class=”widget-entry-summary”><span
style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-max-math-min-trong-javascript/”>Math.max và Math.min trong JavaScript</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-random-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban43.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div class=”widget-entry-summary”><span
style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/math-random-trong-javascript/”>Math.random trong JavaScript</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/throw-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban42.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div class=”widget-entry-summary”><span
style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/throw-trong-javascript/”>throw trong JavaScript và cách trả về ngoại lệ tuỳ ý</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/cac-ngoai-le-trong-javascript-va-cach-xu-ly/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban41.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div
class=”widget-entry-summary”><span style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/cac-ngoai-le-trong-javascript-va-cach-xu-ly/”>Các ngoại lệ trong JavaScript và cách xử lý tương ứng</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/try-catch-trong-javascript/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban40.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div class=”widget-entry-summary”><span
style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/try-catch-trong-javascript/”>try…catch trong JavaScript và cách xử lý ngoại lệ</a></span> <span>tháng 7 1, 2022</span></div></li><li class=”clearfix”><div class=”widget-entry-thumbnail”><a target=”_blank”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/xu-ly-ngoai-le-cua-ham-xu-ly-mo-ta-trong-khoi-try/”><img width=”60px” height=”60px” src=”https://laptrinhcanban.com/css/images/thumbnail_img/laptrinhcanban39.webp?ezimgfmt=rs%3Adevice%2Frscb2-1″ class=”attachment-thumb-small size-thumb-small wp-post-image” alt=”” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></div><div
class=”widget-entry-summary”><span style=”margin:0″><a target=”_blank” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/xu-ly-ngoai-le-cua-ham-xu-ly-mo-ta-trong-khoi-try/”>Xử lý ngoại lệ của hàm xử lý mô tả trong khối try</a></span> <span>tháng 7 1, 2022</span></div></li></ul></div></div><div id=”mgid”><span id=”ezoic-pub-ad-placeholder-146″></span><span
class=”ezoic-ad ezoic-at-0 large-billboard-2 large-billboard-2146 adtester-container adtester-container-146″ data-ez-name=”laptrinhcanban_com-large-billboard-2″><span id=”div-gpt-ad-laptrinhcanban_com-large-billboard-2-0″ ezaw=”336″ ezah=”280″ style=”position:relative;z-index:0;display:inline-block;padding:0;width:100%;max-width:1200px;margin-left:auto!important;margin-right:auto!important;min-height:280px;min-width:336px” class=”ezoic-ad”><script data-ezscrex=”false”
data-cfasync=”false” type=”text/javascript” style=”display:none”>if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[336,280],’laptrinhcanban_com-large-billboard-2′,’ezslot_1′,146,’0′,’0′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-large-billboard-2-0’)};</script></span><span style=”width:336px;display:block;height:14px;margin:auto” class=”reportline”><span style=”text-align:center;font-size:smaller;float:left;line-height:normal”><a
href=”https://www.ezoic.com/what-is-ezoic/” target=”_blank” rel=”noopener noreferrer nofollow” style=”cursor:pointer”><img src=”https://go.ezoic.net/utilcave_com/img/ezoic.png” alt=”Ezoic” loading=”lazy” style=”height:12px!important;padding:2px!important;border:0px!important;cursor:pointer!important;width:58px!important;margin:0!important;box-sizing:content-box!important”></a></span><span class=”ez-report-ad-button”
name=”?pageview_id=c46c0728-4297-41cc-6e50-f2cad01f4731&ad_position_id=146&impression_group_id=laptrinhcanban_com-large-billboard-2/2022-09-02/781770180558717&ad_size=336×280&domain_id=292538&url=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” style=”cursor:pointer!important;font-size:12px!important;color:#a5a5a5;float:right;text-decoration:none!important;font-family:arial!important;line-height:normal”>report this ad</span></span></span></div><div
class=”widget-wrap”><h3 class=”widget-title”>Chủ đề</h3><div class=”widget”><ul class=”category-list”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/”>C</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/”>Lập trình C cơ bản dành cho người mới học lập
trình</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/gioi-thieu-ngon-ngu-c/”>01. Giới thiệu ngôn ngữ C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/cai-dat-moi-truong-lap-trinh-c-c/”>02. Cài đặt môi trường lập trình C/C++</a></li><li
class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/viet-chuong-trinh-c/”>03. Viết chương trình C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/kien-thuc-co-ban-ve-c/”>04. Kiến thức cơ bản về C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/ky-tu-va-so-trong-c/”>05. Ký tự và số trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/nhap-xuat-trong-c/”>06. Nhập xuất trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/bien-trong-c/”>07. Biến trong
C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/lenh-dieu-kien-trong-c/”>08. Lệnh điều kiện trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/vong-lap-trong-c/”>09. Vòng lặp trong C</a></li><li class=”category-list-item”><a target=”_blank”
class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/ham-trong-c/”>10. Hàm trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/so-trong-c/”>11. Số trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/chuoi-string-trong-c/”>12. Chuỗi
string trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/con-tro-trong-c/”>13. Con trỏ trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/mang-trong-c/”>14. Mảng trong C</a></li><li class=”category-list-item”><a target=”_blank”
class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/kieu-cau-truc-trong-c/”>15. Kiểu cấu trúc trong C</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/c/lap-trinh-c-co-ban/file-trong-c/”>16. File trong C</a></li></ul></li></ul></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/”>CPP</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/”>Lập trình C++ cơ bản dành cho người mới học lập trình</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/gioi-thieu-ngon-ngu-cpp/”>01. Giới thiệu ngôn ngữ C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/viet-chuong-trinh-cpp/”>03. Viết chương trình C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/kien-thuc-co-ban-ve-cpp/”>04. Kiến thức cơ bản về C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/nhap-xuat-trong-cpp/”>05. Nhập xuất trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/toan-tu-trong-cpp/”>06. Toán tử trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/ky-tu-va-so-trong-cpp/”>07. Ký tự và số trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/bien-trong-cpp/”>08. Biến trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/lenh-dieu-kien-trong-cpp/”>09. Lệnh điều kiện trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/vong-lap-trong-cpp/”>10. Vòng lặp trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/ham-trong-cpp/”>11. Hàm trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/so-trong-cpp/”>12. Số trong
C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/chuoi-string-trong-cpp/”>13. Chuỗi trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/con-tro-trong-cpp/”>14. Con trỏ trong C++</a></li><li class=”category-list-item”><a
target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/kieu-cau-truc-trong-cpp/”>15. Kiểu cấu trúc trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/string-trong-cpp/”>16. String trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/mang-trong-cpp/”>17. Mảng trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/vector-trong-cpp/”>18. Vector trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/deque-trong-cpp/”>19. Deque
trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/list-trong-cpp/”>20. List trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/forward-list-trong-cpp/”>21. Forward_list trong C++</a></li><li class=”category-list-item”><a
target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/set-trong-cpp/”>22. Set trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/multiset-trong-cpp/”>23. Multiset trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/map-trong-cpp/”>24. Map trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/multimap-trong-cpp/”>25. Multimap trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/unordered-map-trong-cpp/”>26.
Unordered_map trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/file-trong-cpp/”>27. File trong C++</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/cpp/lap-trinh-cpp-co-ban/huong-doi-tuong-trong-cpp/”>28. Hướng đối tượng trong C++</a></li></ul></li></ul></li><li
class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/”>JAVA</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/”>Java cơ bản cho người mới bắt đầu</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank”
class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/gioi-thieu-ngon-ngu-java/”>01. Giới thiệu ngôn ngữ Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/cai-dat-java/”>02. Cài đặt môi trường lập trình Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/viet-chuong-trinh-java/”>03. Viết chương trình Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/kien-thuc-co-ban-ve-java/”>04. Kiến thức cơ bản về Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/cai-dat-encode-trong-java/”>05. Cài đặt mã hoá trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/toan-tu-trong-java/”>06. Toán tử trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/literal-trong-java/”>07. Literal trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/bien-va-kieu-du-lieu-trong-java/”>09. Biến và kiểu dữ liệu trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/lenh-dieu-kien-trong-java/”>10. Lệnh điều kiện trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/vong-lap-trong-java/”>11. Vòng lặp trong Java</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/java/java-co-ban-cho-nguoi-moi-bat-dau/mang-trong-java/”>12. Mảng trong Java</a></li></ul></li></ul></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/”>JAVASCRIPT</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/”>Học javascript – lập trình javascript cơ bản</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/kien-thuc-co-ban-ve-javascript/”>01. Kiến thức cơ bản về chương trình JavaScript</a></li><li class=”category-list-item”><a target=”_blank”
class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/chuoi-trong-javascript/”>02. Chuỗi trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/so-trong-javascript/”>03. Số trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/mang-trong-javascript/”>04. Mảng trong Javascript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/vong-lap-trong-javascript/”>05. Vòng lặp trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/lenh-dieu-kien-trong-javascript/”>06. Lệnh điều kiện trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/toan-tu-trong-javascript/”>07. Toán tử trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/ham-trong-javascript/”>08. Hàm trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/xu-ly-ngoai-le-trong-javascript/”>09. Xử lý ngoại lệ trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/object-trong-javascript/”>10. Object trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/global-function-trong-javascript/”>11. Global function trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/date-object-trong-javascript/”>12. Date Object trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/dom-trong-javascript/”>13. DOM trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/math-object-trong-javascript/”>14. Math Object trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/su-kien-trong-javascript/”>15. Sự kiện trong JavaScript</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/javascript-va-browser/”>16. JavaScript và Broswer</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/javascript/javascript-co-ban-den-nang-cao/form-trong-javascript/”>17. Form trong JavaScript</a></li></ul></li></ul></li><li class=”category-list-item”><a target=”_blank”
class=”category-list-link” href=”https://laptrinhcanban.com/php/”>PHP</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/php/nhap-mon-lap-trinh-php/”>Hướng dẫn học lập trình php cho người mới bắt đầu</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/php/nhap-mon-lap-trinh-php/kien-thuc-can-ban-ve-chuong-trinh-php/”>Kiến thức căn bản về chương trình php</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/php/nhap-mon-lap-trinh-php/vong-lap-trong-php/”>Vòng lặp trong php</a></li></ul></li></ul></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/”>PYTHON</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/”>Python cơ bản – lập trình python cho người mới bắt đầu</a><ul class=”category-list-child”><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/gioi-thieu-python/”>01. Giới thiệu Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/cai-dat-python/”>02. Cài đặt và cấu hình Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/kien-thuc-can-ban-ve-chuong-trinh-python/”>03. Kiến thức căn bản về chuơng trình python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/nhap-xuat-trong-python/”>04. Nhập xuất trong python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/so-trong-python/”>05. Số trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/bien-trong-python/”>06. Biến trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/lenh-dieu-kien-trong-python/”>07. Lệnh điều kiện trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/vong-lap-trong-python/”>08. Vòng lặp trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/thao-tac-voi-chuoi-string-trong-python/”>09. Chuỗi trong python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/list-trong-python/”>10. List trong python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/dictionary-trong-python/”>11. Dictionary trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/tuple-trong-python/”>12. Tuple trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/set-trong-python/”>13. Set trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/”>14. Hàm trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/datetime-trong-python/”>15. Datetime trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/xu-ly-file-trong-python/”>16. Xử lý file trong Python</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/csv-excel-json-xml-pdf/”>17. CSV EXCEL JSON XML PDF</a></li><li class=”category-list-item”><a target=”_blank” class=”category-list-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/dong-goi-chuong-trinh-python/”>18. Đóng gói chương trình python</a></li></ul></li></ul></li></ul></div></div><span class=”ezoic-autoinsert-ad
ezoic-sidebar_bottom”></span><span style=”clear:both;display:block” id=”ez-clearholder-large-leaderboard-1″></span><span class=”ezoic-ad ezoic-at-0 large-leaderboard-1 large-leaderboard-1540 adtester-container adtester-container-540″ data-ez-name=”laptrinhcanban_com-large-leaderboard-1″><span id=”div-gpt-ad-laptrinhcanban_com-large-leaderboard-1-0″ ezaw=”160″ ezah=”600″ style=”position:relative;z-index:0;display:inline-block;padding:0;width:100%;max-width:1200px;margin-left:auto
!important;margin-right:auto!important;min-height:600px;min-width:160px” class=”ezoic-ad”><script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”>if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[160,600],’laptrinhcanban_com-large-leaderboard-1′,’ezslot_9′,540,’0′,’0′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-large-leaderboard-1-0’)};</script></span><span
style=”width:160px;display:block;height:14px;margin:auto”
class=”reportline”><span style=”text-align:center;font-size:smaller;float:left;line-height:normal”><a href=”https://www.ezoic.com/what-is-ezoic/” target=”_blank” rel=”noopener noreferrer nofollow” style=”cursor:pointer”><img src=”https://go.ezoic.net/utilcave_com/img/ezoic.png” alt=”Ezoic” loading=”lazy” style=”height:12px!important;padding:2px!important;border:0px!important;cursor:pointer!important;width:58px!important;margin:0!important;box-sizing:content-box!important”></a></span><span
class=”ez-report-ad-button” name=”?pageview_id=c46c0728-4297-41cc-6e50-f2cad01f4731&ad_position_id=35&impression_group_id=laptrinhcanban_com-large-leaderboard-1/2022-09-02/2143459700526966&ad_size=160×600&domain_id=292538&url=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” style=”cursor:pointer!important;font-size:12px!important;color:#a5a5a5;float:right;text-decoration:none!important;font-family:arial!important;line-height:normal”>report
this ad</span></span></span></div><div id=”toc” class=”toc-article”><span id=”ezoic-pub-ad-placeholder-147″></span><br><br><strong class=”toc-title”>Nội dung</strong><ol class=”nav”><li class=”nav-item nav-level-2″><a target=”_blank” class=”nav-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/#def-trong-python”><span class=”nav-number”>1.</span>
<span class=”nav-text”>def trong python</span></a></li><li class=”nav-item nav-level-2″><a target=”_blank” class=”nav-link” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/#Goi-ham-trong-python”><span class=”nav-number”>2.</span> <span class=”nav-text”>Gọi hàm trong python</span></a></li><li class=”nav-item nav-level-2″><a target=”_blank” class=”nav-link”
href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/#Tong-ket”><span class=”nav-number”>3.</span> <span class=”nav-text”>Tổng kết</span></a></li></ol></div></div></div></article></section></div></div><span class=”ezoic-autoinsert-ad ezoic-bottom_of_page”></span><span style=”clear:both;display:block” id=”ez-clearholder-medrectangle-1″></span><span
class=”ezoic-ad ezoic-at-0 medrectangle-1 medrectangle-1280 adtester-container adtester-container-280″ data-ez-name=”laptrinhcanban_com-medrectangle-1″><span id=”div-gpt-ad-laptrinhcanban_com-medrectangle-1-0″ ezaw=”336″ ezah=”280″ style=”position:relative;z-index:0;display:inline-block;padding:0;width:100%;max-width:1200px;margin-left:auto!important;margin-right:auto!important;min-height:250px;min-width:970px” class=”ezoic-ad”><script data-ezscrex=”false” data-cfasync=”false”
type=”text/javascript” style=”display:none”>if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[336,280],’laptrinhcanban_com-medrectangle-1′,’ezslot_15′,280,’0′,’0′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-medrectangle-1-0’)};</script></span><span style=”width:336px;display:block;height:14px;margin:auto” class=”reportline”><span style=”text-align:center;font-size:smaller;float:left;line-height:normal”><a
href=”https://www.ezoic.com/what-is-ezoic/” target=”_blank” rel=”noopener noreferrer nofollow” style=”cursor:pointer”><img src=”https://go.ezoic.net/utilcave_com/img/ezoic.png” alt=”Ezoic” loading=”lazy” style=”height:12px!important;padding:2px!important;border:0px!important;cursor:pointer!important;width:58px!important;margin:0!important;box-sizing:content-box!important”></a></span><span class=”ez-report-ad-button”
name=”?pageview_id=c46c0728-4297-41cc-6e50-f2cad01f4731&ad_position_id=4&impression_group_id=laptrinhcanban_com-medrectangle-1/2022-09-02/7114977482552711&ad_size=336×280&domain_id=292538&url=https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/” style=”cursor:pointer!important;font-size:12px!important;color:#a5a5a5;float:right;text-decoration:none!important;font-family:arial!important;line-height:normal”>report this ad</span></span></span><footer
id=”footer”><a target=”_blank” href=”https://laptrinhcanban.com/en” style=”color:beige;cursor:pointer;text-decoration:underline”>English</a> |<a target=”_blank” href=”https://laptrinhcanban.com/ja” style=”color:beige;cursor:pointer;text-decoration:underline”>日本語</a> |<a target=”_blank” href=”https://laptrinhcanban.com/” style=”color:beige;cursor:pointer;pointer-events:none”>Tiếng Việt</a> © 2020-2022 Laptrinhcanban.com All Rights Reserved. <a
target=”_blank” rel=”noopener” href=”https://www.dmca.com/Protection/Status.aspx?ID=1631afcd-7c4a-467d-8016-402c5073e5cd” title=”DMCA.com Protection Status” class=”dmca-badge”><img src=”https://laptrinhcanban.com/ezoimgfmt/images.dmca.com/Badges/dmca-badge-w100-5×1-11.png?ID=1631afcd-7c4a-467d-8016-402c5073e5cd&ezimgfmt=rs%3Adevice%2Frscb2-1″ alt=”DMCA.com Protection Status” ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a><script
src=”https://images.dmca.com/Badges/DMCABadgeHelper.min.js”></script><a rel=”license noopener” target=”_blank” href=”https://creativecommons.org/licenses/by-nc-nd/4.0/”><img alt=”Creative Commons License” src=”https://laptrinhcanban.com/ezoimgfmt/licensebuttons.net/l/by-nc-nd/4.0/80×15.png?ezimgfmt=rs%3Adevice%2Frscb2-1″ ezimgfmt=”rs rscb2 src ng ngcb2″ loading=”eager” sizes=”” importance=”high”></a></footer><script>var
wrapdiv=document.getElementById(“wrap”),contentdiv=document.getElementById(“content”);wrapdiv.style.minHeight=document.body.offsetHeight-document.getElementById(“allheader”).offsetHeight-document.getElementById(“footer”).offsetHeight+”px”,contentdiv.style.minHeight=document.body.offsetHeight-document.getElementById(“allheader”).offsetHeight-document.getElementById(“footer”).offsetHeight+”px”</script><link rel=”stylesheet” href=”http://boxhoidap.com/fancybox/jquery.fancybox.css?ff=1&wps=false”><script></script><script></script><script></script></div><a
target=”_blank” id=”rocket” href=”https://laptrinhcanban.com/python/nhap-mon-lap-trinh-python/ham-trong-python/ham-def-trong-python/#top”></a><script async></script><div class=”ezmob-footer ezoic-floating-bottom ezo_ad ezmob-footer-desktop” id=”ezmobfooter”><center><span id=”ezoic-pub-ad-placeholder-100″></span><div class=”ezmob-footer ezoic-floating-bottom ezo_ad ezmob-footer-desktop” id=”ezmobfooter”><center><span class=”ezoic-ad
ezoic-at-4 medrectangle-2 medrectangle-2100 adtester-container adtester-container-100″ data-ez-name=”laptrinhcanban_com-medrectangle-2″><span id=”div-gpt-ad-laptrinhcanban_com-medrectangle-2-0″ ezaw=”728″ ezah=”90″ style=”position:relative;z-index:0;display:inline-block;padding:0;min-height:90px;min-width:728px” class=”ezoic-ad”><script data-ezscrex=”false” data-cfasync=”false” type=”text/javascript” style=”display:none”>if(typeof ez_ad_units !=
‘undefined’){ez_ad_units.push([[728,90],’laptrinhcanban_com-medrectangle-2′,’ezslot_0′,100,’0′,’0′])};if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-laptrinhcanban_com-medrectangle-2-0’)};</script></span></span></center><span class=”ezmob-footer-close” onclick=”__ez_close_anchor()”>x</span></div></center><span class=”ezmob-footer-close” onclick=”__ez_close_anchor()”>x</span></div><script
type=”text/javascript”> var __inScopeForCCPA = false; function __uspapi(command, version, callback) { var response = null; var successs = false; if (command === “getUSPData” && version === 1) { var uspString = “1”; // Version if (__inScopeForCCPA) { uspString += “Y”; // Has Explicit Notice for Opt Out been provided (ex footer or minor consent modal) var result; var consentCookie = (result = new RegExp(‘(?:^|; )ezoccpaconsent=([^;]*)’).exec(document.cookie)) ? (result[1]) : null; if
(consentCookie === “nonconsent”) { uspString += “Y”; } else { uspString += “N”; } uspString += “N” // Is pub a signatory to the IAB Limited Service Provider Agreement (http://www.iabprivacy.com/) } else { uspString += “—“; } response = { uspString: uspString, version: 1 }; success = true; } return callback(response, success); }; function __receiveUspapiMessage(event) { if (event.data.hasOwnProperty(‘__uspapiCall’)) { __uspapi(‘getUSPData’, 1, function(uspData, success) {
event.source.postMessage({ __uspapiReturn: { returnValue: uspData, success: success, callId: event.data.__uspapiCall.callId } }, event.origin); }); } return null; }; window.addEventListener(“message”, __receiveUspapiMessage, false); </script> <script>function __ez_fad_ezpbinit(){var s = document.createElement( ‘script’ ); s.setAttribute( ‘src’, ‘//go.ezodn.com/hb/dall.js?b=adyoulike,amx,criteo,onemobile,onetag,pulsepoint,smilewanted&cb=195-0-45′ ); s.onerror = function ()
{window.ezDallErr = true}; document.body.appendChild( s );}var ezSmile={bidder:’smilewanted’,params:{zoneId:’ezoic.com_hb_display’}};var ezAMX={bidder:’amx’,params:{tagId:’ZXpvaWMuY29t’}};var ezOneTag={bidder:’onetag’,params:{pubId:’62499636face9dc’}};var ezAYL={bidder: ‘adyoulike’, params: { placement: ‘1445fa30166d47821a0f97789148a105′ }};var ezCriteo={bidder:’criteo’,params:{networkId:’7987′}};var ezjsps=function(obj){return JSON.parse(JSON.stringify(obj));};var epbjs=epbjs||{};epbjs.que=epbjs.que||[];epbjs.bidderTimeout=2000;epbjs.useAdj=true;epbjs.SS={“adyoulike”:11314,”amx”:11290,”criteo”:10050,”onemobile”:11293,”onetag”:11291,”pulsepoint”:11301,”smilewanted”:11313};epbjs.bidders=[‘adyoulike,amx,criteo,onemobile,onetag,pulsepoint,smilewanted’];epbjs.que.push(function(){});epbjs.bidderSettings={};epbjs.gadj=1.000000;var
__enableAnalytics=false; var __s2sbidders=[]; var __s2sinstreambidders=[‘ix’,’rubicon’,’pubmatic’,’vidoomy’,’viewdeosDX’]; var __allBidders=[‘smilewanted’,’pulsepoint’,’onemobile’,’amx’,’onetag’,’adyoulike’,’criteo’]; __ez.queue.addFile(‘/detroitchicago/houston.js’, ‘/detroitchicago/houston.js?gcb=0&cb=23’, false, [], true, false, true, false);__ez.queue.addFunc(“epbjsRequestAdUnits”, “epbjsRequestAdUnits”, [[{code: ‘div-gpt-ad-laptrinhcanban_com-medrectangle-2-0’, mediaTypes: {banner: {
sizes:[[728,90]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { ct: 719177, cp: 562406, cf: ‘728×90’ }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] },{code: ‘div-gpt-ad-laptrinhcanban_com-large-billboard-2-0’, mediaTypes: {banner: { sizes:[[336,280],[300,250]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { cp: 562406, cf: ‘336×280’, ct: 719186 }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] },{code:
‘div-gpt-ad-laptrinhcanban_com-box-1-0’, mediaTypes: {banner: { sizes:[[300,250]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { cp: 562406, cf: ‘300×250’, ct: 719185 }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] ,sizeMapping: [ { minWidth: 300, sizes: [[300,250]] }]},{code: ‘div-gpt-ad-laptrinhcanban_com-box-1-0_1’, mediaTypes: {banner: { sizes:[[300,250]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { cp: 562406, ct: 719185, cf: ‘300×250’ }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)]
,sizeMapping: [ { minWidth: 300, sizes: [[300,250]] }]},{code: ‘div-gpt-ad-laptrinhcanban_com-box-1-0_2’, mediaTypes: {banner: { sizes:[[300,250]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { cf: ‘300×250’, ct: 719185, cp: 562406 }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] ,sizeMapping: [ { minWidth: 300, sizes: [[300,250]] }]},{code: ‘div-gpt-ad-laptrinhcanban_com-box-1-0_3’, mediaTypes: {banner: { sizes:[[300,250]] }}, bids: [ezjsps(ezSmile),{bidder:
‘pulsepoint’, params: { cf: ‘300×250’, ct: 719185, cp: 562406 }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] ,sizeMapping: [ { minWidth: 300, sizes: [[300,250]] }]},{code: ‘div-gpt-ad-laptrinhcanban_com-large-leaderboard-1-0’, mediaTypes: {banner: { sizes:[[160,600]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { cp: 562406, ct: 719188, cf: ‘160×600’ }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] },{code:
‘div-gpt-ad-laptrinhcanban_com-large-leaderboard-2-0’, mediaTypes: {banner: { sizes:[[728,90]] }}, bids: [ezjsps(ezSmile),{bidder: ‘pulsepoint’, params: { ct: 719177, cf: ‘728×90’, cp: 562406 }},ezjsps(ezAMX),ezjsps(ezOneTag),ezjsps(ezAYL),ezjsps(ezCriteo)] }]], false, [‘/detroitchicago/houston.js’], true, true, true, true);var __pd =
‘MTA9ZGFmMWRjZTFkYmJmMTM2OWIzNGQ0NzRkN2M3NmJiNWU4MTUwOThiMmQ4NDRhN2VkNDBiMTNlY2E3YzU0ZDI4NCYxMj1Nb3ppbGxhJTJGNS4wKyUyOFgxMSUzQitMaW51eCt4ODZfNjQlM0IrcnYlM0ExMDIuMCUyOStHZWNrbyUyRjIwMTAwMTAxK0ZpcmVmb3glMkYxMDIuMA==’;</script> <script>var __ez_tkn_evnt = function() { if(typeof(_ezaq) != ‘undefined’){if(typeof window.ezogtk !== “undefined” && window.ezogtk !== “”) {__ez.bit.AddAndFire(_ezaq.page_view_id,[new __ezDotData(“ext_user_hash”,window.ezogtk)]);}}};document.addEventListener(“DOMContentLoaded”,
__ez.queue.addFunc(“__ez_tkn_evnt”, “__ez_tkn_evnt”, event, false, [‘/detroitchicago/minneapolis.js’,’/detroitchicago/memphis.js’], true, true, false, true));</script> <script async data-ezscrex=”false”>__ez_fad_load(0,0);__ez_fad_doc_ht=__ez_fad_docht();__ez_fad_vp_ht=__ez_fad_vpht();function __ez_fad_scroll(){return window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop} var __ez_fad_init_scroll=__ez_fad_scroll();var
__ez_fad_scroll_delta=0;var __ez_fad_check_scroll_override=function(){var currScroll=__ez_fad_scroll();if(__ez_fad_scroll_delta>__ez_fad_vp_ht){if(currScroll===__ez_fad_init_scroll){for(var i=0;i<__ez_fad_divs.length;i++) if(ezslit_run[i]!==true){__ez_fad_load(i,null);}} document.removeEventListener(‘wheel’,__ez_fad_wheel_check);document.removeEventListener(‘touchstart’,__ez_fad_touch_check);}};var __ez_fad_wheel_check=function(e){__ez_fad_scroll_delta+=e.deltaY;__ez_fad_check_scroll_override();};var
__ez_fad_touch_check=function(e){var delta=0;var startY=e.touches[0].pageY;var handleTouchMove=function(e){var currY=e.touches[0].pageY;delta+=startY-currY;startY=currY;};var handleTouchEnd=function(e){document.removeEventListener(‘touchmove’,handleTouchMove);document.removeEventListener(‘touchend’,handleTouchEnd);__ez_fad_scroll_delta+=delta;__ez_fad_check_scroll_override();};document.addEventListener(‘touchmove’,handleTouchMove);document.addEventListener(‘touchend’,handleTouchEnd);};document.addEventListener(‘wheel’,__ez_fad_wheel_check);document.addEventListener(‘touchstart’,__ez_fad_touch_check);var
__ez_fad_scrollmond=false;var __ez_fad_scrollmon=function(){var sy=__ez_fad_scroll();var isShortPage=__ez_fad_doc_ht<=(__ez_fad_vh+100);var bot=(__ez_fad_vp_ht+sy);var botThresh=bot+__ez_fad_vp_ht;for(var divid in __ez_fad_divpos){if(__ez_fad_fastdiv.indexOf(divid)!=-1){continue;} var divPos=__ez_fad_divpos[divid];if(divPos>0&&divPos>sy&&divPos<(sy+__ez_fad_vp_ht*.5)){if(typeof __ez_fad_instaslots[divid]==’function’){__ez_fad_instaslots[divid]();}}else if(divPos>0&&divPos>sy&&divPos<(sy+__ez_fad_vp_ht)){if(typeof
__ez_fad_viewslots[divid]==’function’){__ez_fad_viewslots[divid]();}}} __ez_fad_chkpos();if(ezslit_run[0]!==true){__ez_fad_load(0,0);} if((sy>0||isShortPage)&&ezslit_run[1]!=true){__ez_fad_load(1,null);__ez_fad_load(5,null);} if((sy>100||isShortPage)&&ezslit_run[2]!=true){__ez_fad_load(2,null);} if(sy>(__ez_fad_vp_ht*.75)&&ezslit_run[3]!=true){__ez_fad_load(3,null);} if(document.readyState===”complete”&&!__ez_fad_floatshowd&&typeof
__ez_fad_floating!==’undefined’&&__ez_fad_floating.length>0&&__ez_fad_count===0){setTimeout(googletag.cmd.push(function(){__ez_fad_floatshow()}),500);} if((ezslit_run[1]==true&&ezslit_run[2]==true&&ezslit_run[3]==true)||__ez_fad_count===__ez_fad_divsd.length){__ez_fad_scrollmond=true;}else{setTimeout(__ez_fad_scrollmon,500);}};__ez_fad_scrollmon();function __ez_fad_chkpos(){if(typeof __ez_fad_divs[4]!=’undefined’){for(var i=0;i<__ez_fad_divs[4].length;i++){var
id=__ez_fad_divs[4][i];__ez_fad_divs[4][i]=null;__ez_fad_position([id]);}}}</script> <script>setTimeout(function(){googletag.cmd.push(function(){if(typeof ezslot_interstitial===”undefined”){return;} googletag.display(ezslot_interstitial);googletag.pubads().refresh([ezslot_interstitial]);});},1000);</script> <script type=”text/javascript” data-cfasync=”false”>!function(){var e=function(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(0==n.complete||void
0!==n.readyState&&n.readyState<4){var o=n.getAttribute(“src”)||n.currentSrc;void 0!==n.readyState&&0==n.readyState?n.addEventListener(“loadstart”,(function(e){var t=e.currentTarget.getAttribute(“src”)||e.currentSrc;window.ezorqs(e,t)})):(o=n.getAttribute(“src”)||n.currentSrc,window.ezorqs(n,o)),n.addEventListener(“load”,(function(e){var t=e.currentTarget.getAttribute(“src”)||e.srcElement.currentSrc;window.ezorqe(e,t)})),n.addEventListener(“loadeddata”,(function(e){var
t=e.currentTarget.getAttribute(“src”)||e.srcElement.currentSrc;window.ezorqe(e,t)})),n.addEventListener(“error”,(function(e){var t=e.currentTarget.getAttribute(“src”)||e.srcElement.currentSrc;window.ezorqe(e,t)}))}}};function t(e){for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].href==e)return!0;return!1}__ez_addAllListeners=function(){e(0,document.querySelectorAll(“img”)),e(0,document.querySelectorAll(“video”)),e(0,document.querySelectorAll(“audio”)),function(e){for(var
r=0;r<e.length;r++){var n=e[r];if((“preload”==n.getAttribute(“rel”)||”stylesheet”==n.getAttribute(“rel”))&&null!=n.getAttribute(“href”)&&t(n.getAttribute(“href”))){window.ezorqs(n,n.getAttribute(“href”));var o=document.createElement(“img”);o.onerror=function(e){void 0!==e.path&&void 0!==e.path[0].currentSrc?window.ezorqe(n,e.path[0].currentSrc):void 0!==e.srcElement&&void 0!==e.srcElement.href&&window.ezorqe(n,e.srcElement.href)},o.src=n.getAttribute(“href”)}}}(document.querySelectorAll(“link”)),void
0!==window.__ez.ssaf&&window.__ez.ssaf.indexOf(16)>-1&&void 0!==window.__ez.sshsdef&&!1===window.__ez.sshsdef&&Element.prototype.addEventListener&&(“function”==typeof window.onload&&(window.addEventListener(“load”,window.onload),window.onload=null),”function”==typeof document.onload&&(document.addEventListener.addEventListener(“load”,document.onload),document.onload=null))},__ez.queue.addFunc(“__ez_addAllListeners”,”__ez_addAllListeners”,null,!1,[“/detroitchicago/tulsa.js”],!0,!0,!0,!0)}();</script>
<script type=”text/javascript” style=”display:none”>var __ez_dims = (function() { var setCookie = function( name, content, expiry ) { return document.cookie = name+’=’+content+((expiry)?’;expires=”+(new Date(Math.floor(new Date().getTime()+expiry*1000)).toUTCString()):”‘)+’;path=/’; }; var ffid = 1; var oh = window.screen.height; var ow = window.screen.width; var h = ffid === 1 ? oh : (oh > ow) ? oh : ow; var w = ffid === 1 ? ow : (oh > ow) ? ow : oh; var uh = window.innerHeight ||
document.documentElement.clientHeight || document.getElementsByTagName(‘body’)[0].clientHeight; var uw = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName(‘body’)[0].clientWidth; setCookie(‘ezds’, encodeURIComponent(‘ffid=’+ffid+’,w=’+w+’,h=”+h), (31536e3*7)); setCookie(“ezohw’, encodeURIComponent(‘w=’+uw+’,h=”+uh), (31536e3*7)); })();</script><script type=”text/javascript” style=”display:none” async> </script> </body></html>


Thuộc website harveymomstudy.com

Xem thêm:  Dáng đất được thể hiện trên bản đồ bằng

Related Posts