Python

Python Higher Order Functions Example

In one word, if a function can accept another function as input parameter, such a function is called a higher order function. Python provide several higher order functions to simplify your coding, this article will introduce them with examples.

Python Slice Example

1. Slice List. Taking a partial element from a list or tuple is a very common operation. For example, how to take the first three elements from below list? >>> L = [‘Richard’, ‘Tom’, ‘Jerry’, ‘Jackie’, ‘Kevin’] You can take elements from above list like below. >>> [L[0], L[1], L[2]] [‘Richard’, ‘Tom’, ‘Jerry’] But when you …

Python Slice Example Read More »

Python Auto Send Mail Library Yagmail Example

Yagmail is a python library which can make sending email simple and easy. This article will show you examples about how to use yagmail to send emails to multiple receivers with multiple attachments, it also shows the difference between yagmail and general python sending email method.

Python Django Model Example

Model is generally used to represent database table data. It contains the basic fields and behaviors of the data you are storing. Django provides structured data processing and operation processing for your network applications through the abstract model layer (models). Database-related code is generally written in models.py. Django supports SQLite3, MySQL, PostgreSQL and other databases, …

Python Django Model Example Read More »

Python Access SQLite Database Example

SQLite is an embedded database which store all database data in a file. Because SQLite itself is written in C and small in size, it is often integrated into various applications, such as iOS and Android Apps. Python has built-in SQLite3 support, so you don’t need to install anything to use SQLite in Python.

Python SMTP Send Email Example

The email has a long history than the Web. Until now, it is also a very widely used service on the Internet. Almost all programming languages support sending and receiving e-mail, but wait a minute before we start coding, it’s necessary to figure out how e-mail works on the Internet.

Clicky