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 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 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.