Skip to main content

User account menu

Show — User account menu Hide — User account menu
  • Log in
Scalingbits
Make the Internet scale

Primary links

Show — Primary links Hide — Primary links
  • Impressum (Imprint)
  • Privacy Policy
  • about

Breadcrumb

  1. Home
  2. Python

Tuples (Cheat Sheet)

Tuples are similar to lists:

Lists Tuples
mutable immutable
use square brackets to identify use parentheses to identify

Tuples tend to be faster since they are immutable

Example

sentence = ( "This", "is", "a", "tuple")
print(sentence[1])
sentence[3] = "phrase"

An empty tuple:

sentence = ()
  • Printer-friendly version
  • Log in to post comments
  • 129 views

Book traversal links for Tuples (Cheat Sheet)

  • ‹ Strings (Cheat Sheet)
  • Up
  • Working with Files (Cheat Sheet) ›

Search

LocalNavigation

Show — LocalNavigation Hide — LocalNavigation
  • Blogs
  • Drupal
  • MySQL
  • Internetauftritte in Deutschland
  • tracking (SEO)
  • AWS
  • Java
  • Solaris
  • Dictionaries (Cheat Sheet)
  • Exceptions and their handling (Cheat Sheet)
  • Function and Modules (Cheat Sheet)
  • Functional Programming
  • Lists and Ranges (Cheat Sheet)
  • Loops and Branches (Cheat Sheet)
  • Numeric Functions
  • Strings (Cheat Sheet)
  • Tuples (Cheat Sheet)
  • Working with Files (Cheat Sheet)

Main navigation

Show — Main navigation Hide — Main navigation
  • Home

Today's:

  • 2.3 Operatoren und Ausdrücke
  • Installation of a Graphical Desktop with RDP Access for SUSE SLES 11, 12, 15 or Ubuntu
  • Stufe 4: Suchen einer Lösung mit Backtracking
  • Sortieralgorithmen
  • Sortieren durch Einfügen (Insertionsort)

Last viewed:

  • Javafragen
  • Weitere Klassen
  • AWS Specific Drivers
  • Starting Greengrass V1 automatically on a Raspberry Pi
  • Enable root Access for Linux Instances