Tuples & Dictionaries

Description

Flashcards on Tuples & Dictionaries, created by Aparna Dhirde on 03/18/2020.
Aparna Dhirde
Flashcards by Aparna Dhirde, updated more than 1 year ago
Aparna Dhirde
Created by Aparna Dhirde almost 6 years ago
19
0

Resource summary

Question Answer
Tuples An ordered sequence of elements of different data types
Tuple is Immutable Means that the elements of a tuple cannot be changed after it has been created
Tuple Operations Concatenation, Repetition, Repetition, Slicing
Built in Functions functions whose functionality is pre-defined
tuple () Creates a tuple if a sequence is passed as argument
index () Returns the index of the first occurrence of the element in the given tuple.
Nested Tuples A tuple inside another tuple
Dictionary Dictionary is an unordered collection of items where each item consist of a key and a value.
Dictionary is mutable Means can modify its contents but Key must be unique and immutable
Show full summary Hide full summary

Similar