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
  • 128 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:

  • 8.2 Vererbung in Java
  • Skript: Grundlagen der Programmierung
  • Übungen, Fragen (Generics)
  • Skript: Fortgeschrittene Programmierung, Algorithmen und Datenstrukturen
  • 4.1 Methoden

Last viewed:

  • IP Failover with Overlay IP Addresses
  • 8.2 Vererbung in Java
  • 12.1.3 GUI IO (Swing)
  • 12.1.4 Math
  • JMenuBar, JMenu, JMenuItem