Tony Tan tonytan748.github.io
1.

Socket client and server in Python

A sample example for connection server and client use socket in Python Client.py import socket s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect(('localhost',8081)...
2.

Python sqlite3 get table column name

Get the column name use inquiry result: import sqlite3 db=sqlite3.connect('data.db') cur=db.cursor() cur.execute('SELECT * FROM table') col_name_list=[i[0] for i in cur.descri...