<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>11A2- Những cô gái đồng quê by 21.Nguyễn Nhã Ngọc</title>
      <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb</link>
      <description>bổ quả báo thấy nhóm làm Python đúng nhận sai không cãi</description>
      <language>en-us</language>
      <pubDate>2023-03-30 06:39:07 UTC</pubDate>
      <lastBuildDate>2023-04-06 09:17:23 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f6a9.png</url>
      </image>
      <item>
         <title>1)Sự khác nhau</title>
         <author></author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537962348</link>
         <description><![CDATA[<div><strong><em>Tuple</em></strong> : là một collection có thứ tự, không thể thay đổi. Cho phép chứa dữ liệu trùng lặp.<br><strong><em>Set</em></strong> : là một collection không có thứ tự, không có chỉ mục. Không cho phép chứa dữ liệu trùng lặp.<br><strong><em>Dictionary</em></strong> : là một collection không có thứ tự, có thể thay đổi và lập chỉ mục. Không cho phép chứa dữ liệu trùng lặp.<br><strong><em>Chú ý:</em></strong><br>[] sử dụng khai báo List<br>() sử dụng khai báo Tuple<br>{} sử dụng khai báo Set<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:19:59 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537962348</guid>
      </item>
      <item>
         <title></title>
         <author>yumixinhdepne1210</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537968556</link>
         <description><![CDATA[<div>Để khai báo một Tập hợp, chúng ta sử dụng cặp dấu ngoặc nhọn {} để tạo một tập hợp.<br><strong><em>VD:</em></strong></div><div>	Tạo một tập hợp rỗng</div><div><em># cú pháp&nbsp;</em></div><div>st = {}</div><div><em># hoặc&nbsp;</em></div><div>st = set()</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; Tạo một tập hợp có chứa các phần tử</div><div>fruits = {'banana', 'orange', 'mango', 'lemon'}</div><div><br></div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:24:57 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537968556</guid>
      </item>
      <item>
         <title>B. Các phép toán trong tập hợp</title>
         <author>yumixinhdepne1210</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537972045</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:27:46 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537972045</guid>
      </item>
      <item>
         <title>1.Phương thức .add()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537973827</link>
         <description><![CDATA[<div><br></div><div>Phương thức sử dụng để thêm một phần tử vào tập hợp.</div><div><strong>Ví dụ:</strong></div><div>friends = {"Lisa","Jisoo","Rosé"}</div><div>friends.add("Jennie")</div><div>print(friends)&nbsp; # Kết quả là {"Lisa","Jisoo","Rosé","Jennie"}</div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:29:15 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537973827</guid>
      </item>
      <item>
         <title>2.Phương thức .remove()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537981191</link>
         <description><![CDATA[<div>Loại bỏ một phần tử trong tập hợp.</div><div><strong>Ví dụ:</strong></div><div>friends = {"Rolf","Bob","Anne"}</div><div>friends.remove("Anne")</div><div>print(friends) &nbsp;</div><div># Kết quả là {"Rolf","Bob"}</div><div><br></div><div>friends.remove("Jen")</div><div>print(friends)</div><div># Kết quả là lỗi KeyError: "Jen"</div><div><br></div><div>=&gt; Khi loại bỏ một phần tử, nếu phần tử đó không tồn tại trong tập h</div><div><br><br></div><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:35:43 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537981191</guid>
      </item>
      <item>
         <title>3.Phương thức .discard()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537981975</link>
         <description><![CDATA[<div>Giống như phương thức .remove(), discard() loại bỏ phần tử trong tập hợp, tuy nhiên nếu phần tử đó không tồn tại thì nó không báo lỗi gì cả.</div><div>friends = {"Rolf","Bob","Anne"}</div><div>friends.discard("Anne")</div><div>print(friends)&nbsp;</div><div># Kết quả là {"Rolf","Bob"}</div><div>friends.discard("Jen")</div><div>print(friends)&nbsp;</div><div># Kết quả là {"Rolf","Bob"}</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:36:24 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537981975</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537982635</link>
         <description><![CDATA[<div>- Bạn không thể truy cập các phần tử trong một Set bằng cách sử dụng chỉ mục, vì Set không lưu trữ các phần tử theo thứ tự nhập ban đầu.<br>- Bạn có thể sử dụng vòng lặp for để truy cập các phần tử của một Set.<br>VD: duyệt các phần tử của một Set và in các giá trị ra màn hình:<br>setFruits = {"apple", "cherry", "banana"}<br>for x in setFruits:<br>&nbsp; &nbsp; &nbsp;print(x)<br><br>Kết quả:&nbsp;<br>apple<br>cherry<br>banana</div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:36:59 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537982635</guid>
      </item>
      <item>
         <title>A.Các phương thức</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537982839</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:37:09 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537982839</guid>
      </item>
      <item>
         <title>4.Phương thức .pop()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537984216</link>
         <description><![CDATA[<div>Loại bỏ một phần tử ngẫu nhiên khỏi tập hợp.</div><div>friends = {"MAnh","BNgan","Kphuong"}<br>friends.pop()<br>print(friends) # Kết quả là {"MAnh","BNgan"}</div><div><strong>Cần chú ý</strong> về thứ tự các phần tử trong tập hợp, nó không được sắp xếp theo bất kỳ quy tắc nào.<strong><br></strong><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:38:13 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537984216</guid>
      </item>
      <item>
         <title>5.Phương thức .clear()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537984919</link>
         <description><![CDATA[<div>Loại bỏ tất cả các phần tử trong tập hợp, khi đó tập hợp được gọi là tập rỗng.</div><div>friends = {"MAnh","BNgan","Kphuong"}</div><div>friends.clear()</div><div><br>print(friends) # Kết quả là set()</div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:38:41 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537984919</guid>
      </item>
      <item>
         <title>6. Phương thức .update()</title>
         <author>hoangbichngan11a217</author>
         <link>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537985519</link>
         <description><![CDATA[<div>Phương thức .add() ở trên chỉ thêm được 1 phần tử vào tập hợp với 1 câu lệnh, để thêm nhiều phần tử, chúng ta sử dụng .update(). Chú ý, đầu vào của .update() có thể là một Set, một List hoặc một Tuple.</div><div>friends = {"MAnh","BNgan","Kphuong"}</div><div>friends.update(["Jen","Charlie"],{"Johnny", "Sara"},("Laura","Elite"))</div><div><strong><br>print(friends) </strong># Kết quả là {'MAnh', 'Laura', 'Elite', 'BNgan', 'Johnny', 'Kphuong', 'Bob', 'Sara', 'Jen'}</div><div><br>Kết quả của bạn có thể có thứ tự khác đi.<br><br>*<strong>Chú ý</strong> : không sử dụng chuỗi để cập nhập vào tập hợp mà các phần tử là chuỗi bởi vì chuỗi sẽ được coi là một danh sách các ký tự, ví dụ:</div><div>friends = {"MAnh","BNgan","Kphuong"}</div><div>friends.update("Jen")</div><div>print(friends) # Kết quả là {'n', 'e', ‘MAnh’, ‘BNgan’, ‘Kphuong’, 'J'}</div><div><br></div><div>Không như mong đợi phải không, bạn có thể sử dụng phương thức .add() hoặc có thể chuyển chuỗi thành Set, List hoặc Tuple có 1 phần tử:</div><div>friends = {"MAnh","BNgan","Kphuong"}</div><div>friends.update(("Jen",))</div><div># hoặc</div><div>friends.update(["Jen"])</div><div># hoặc</div><div>friends.update({"Jen"})<br><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2023-03-30 07:39:10 UTC</pubDate>
         <guid>https://padlet.com/yumixinhdepne1210/fkd7120c9nxx1xgb/wish/2537985519</guid>
      </item>
   </channel>
</rss>
