Array|数组

Array|数组

定义 把数据码成一排进行存放 In Java, all data must be of the same type In Python, we can store different data types Index, usually start from 0 (R starts from 1) 数组支持for, forEach因为它具有可迭代,可遍历的能力 (iterable) 二次封装属于

Read More

JSON in Python

JSON in Python

What is JSON Definition JSON is Javascript Object Notation. JSON is a light weight data exchange format. JSON string is a string that satisfies JSON format. {"name": "Isaac Zhou"}

Read More

Regex: General

Regex: General

Table of Contents Regex: General What is regex? Using Built-in Python Function Use Regex module Special char vs. Regular char Using Regex Special string char General char Counts match fixed len

Read More

Regex: Sub

Regex: Sub

Table of Contents Introducing re.sub the power of re.sub function as a parameter For regex, there are more than just find. Here I will discuss replacement

Introducing re.sub re.sub matches first th

Read More

Init Method

Init Method

init method define init function class User(): name = "" pwd = "" def init(self): print("user") def sign_up(self): print("User Sign Up") init w

Read More

Class Definition

Class Definition

Object Oriented Programming (OOP) We need to write meaningful OOP codes, merely having classes doesn’t mean it’s oop. Defining a class Class: defined by class ClassName class Student()

Read More

Class and Object

Class and Object

Class and Object Class: a mapping between computer programs and the entities from real/thinking realm. It’s a blueprint that defines a set of attributes that will characterize any object that i

Read More