- 博客(14)
- 收藏
- 关注
原创 Queue (Linked & Sequential) in Python
@[TOC](Queue (Linked & Sequential) in Python)1. Nodeclass Node: def __init__(self, data): self.data = data self.next = None def __eq__(self, data): return self.data == data def __str__(self): return str(s
2021-02-27 02:27:01
153
原创 Linked Stack in Python
Linked Stack in Python1. Node2. Stack3. Test Codes1. Nodeclass Node: def __init__(self, data): self.data = data self.next = None def __str__(self): return str(self.data)2. Stackclass Stack: def __init__(self):
2021-02-26 23:51:01
147
原创 Circular Linked List in Python
Circular Linked List in Python1. Node2. Circular Linked List3. Test Codes1. Nodeclass Node: def __init__(self, data): self.data = data self.next = None def __eq__(self, data): return self.data == data def __str__
2021-02-26 15:41:01
187
原创 Doubly Linked List in Python
Doubly Linked List in Python1. 结点定义2. 双向链表的实现3. 测试程序1. 结点定义class Node: def __init__(self, data): self.data = data self.prev = None self.next = None def __eq__(self, data): return self.data == data def __str__
2021-02-26 15:36:09
170
原创 Singly Linked List in Python
单链表的Python语言实现1. 结点定义2. 单链表实现3. 测试程序1. 结点定义class Node: def __init__(self, data): self.data = data self.next = None def __str__(self): return str(self.data)2. 单链表实现class SinglyLinkedList: def __init__(self):
2021-02-26 15:27:51
213
原创 tar.gz & tar.bz2 解压命令
*.tar.gz格式tar -zxvf xx.tar.gz*.tar.bz2格式 `tar -jxvf xx.tar.bz2`
2017-04-21 16:40:13
562
原创 apt update error "E: The package lists or status file could not be parsed or opened."
Issuessudo apt update...E: Problem parsing dependency DependsE: Error occurred while processing readline-common (NewVersion2)E: Problem with MergeList /var/lib/dpkg/statusE: The package lists or s
2017-04-20 17:05:52
2196
原创 Solution: Remmina无法连接到RDP服务器xxx
solution: $sudo rm -f ~/.freerdp/know_hosts
2016-12-02 10:20:21
1502
原创 Notes on Python Debugger pdb
Python comes with its own debugger module — pdb. You can set breakpoints, step through your code, inspect stack frames and more.How to Start the DebuggerImport pdb and insert pdb.set_trace() into your
2016-11-20 23:43:28
283
原创 Some Basic Knowledge Points of Python Programming
if __name__ == "__main__":# do sth.This tells Python that you only what to run the following code if this program is executed as a standalone file. We can use it to test our code.When you do import a m
2016-11-20 01:04:03
248
原创 Notes on Exception Handling in Python
Note: error and exception are the same in Python.Common ExceptionException Almost all the others are built off of it.AttributeError Raised when an attribute reference or assignment fails.IOError Rai
2016-11-20 00:20:36
324
原创 Note on Python File Operation
How to Read Files Piece by Pieceh = open('test.txt', 'r')for line in h: print(h)h.close()h = open('test.txt', 'r')while True: data = h.read(1024) print(data) if not data: bre
2016-11-19 23:25:09
378
原创 Notes on Python Comprehensions
List Comprehensionsx = [i for i in range(10)]if [i for i in line if "SOME TERM" in i]: # do somethingx = ['1', '2', '3', '4', '5']y = [int(i) for i in x]my_strs = [s.strip() for s in str_list]vec
2016-11-18 23:56:46
252
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人