程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Getting Started with Python in 30 Days (Day 6: Deep Dive into Tuples in Python)

編輯:Python

Introduction to Python in 30 days (Day 6: Deep dive into tuples in Python)

  • tuple
    • Tuples and lists
    • Create a tuple
    • Find the length of the tuple
    • Accessing tuple items
    • tuple slices
    • Convert tuples to lists
    • Check if an item exists in a tuple
    • Merge Tuples
    • Remove Tuple
  • Summary
    • Exercise: Level 1
    • Exercise: Level 2

tuple

Tuple is a basic concept in relational databases. A relationship is a table. Each row in the table (that is, each record in the database) is a tuple, and each column is an attribute.In two-dimensional tables, tuples are also called rows.

A tuple is an ordered and immutable (immutable) collection of different data types.Tuples are written with parentheses ().Once a tuple is created, we cannot change its value.We cannot use add, insert, remove methods in a tuple because it is immutable (mutable).Unlike lists, tuples have few methods.Methods related to tuples:

  • tuple(): create

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved