Lists in Python Parallel lists.

Slides:



Advertisements
Similar presentations
Identifiers and Assignment Statements. Data structures In any programming language you need to refer to data The simplest way is with the actual data.
Advertisements

Lists in Python.
Choosing a Dental Plan Student Name
Mitchell Cox University of the Witwatersrand, Johannesburg
GDOT Approach to Wall Foundation Investigations
Constraint-Aware Software-Defined Network for Routing
Characterization of Circuit Components Using S-Parameters
Three Eras of Cosmology
MEC-E5005 Fluid Power Dynamics L (5 cr)
Geotechnical Engineering II CE 481
Cavity locking, thermal effects and the phase cameras
Precision mass measurements of
The Structure of Atoms.
LECTURE 8 The Definite Integral.
西村美紀(東大) 他 MEGIIコラボレーション 日本物理学会 2016年秋季大会 宮崎大学(木花キャンパス)
Materials for Energy Storage
Diverse Beam Search Ashwin Kalyan
James P. Fowler and Thomas J. Galarneau, Jr.
MedDRA Coding for Adverse Event (AE) Logs
Rank Size Rule And Primate Cities
1 INTRODUCTION - Q2KFortran2_11
MRI OF FACIAL COSMETIC INJECTABLE FILLERS: AN ANALYTIC APPROACH for IDENTIFICATION OF INJECTED SUBSTANCE, COMPLICATIONS AND SYMMETRY OF INJECTED SITES.
Supervisor: Jay X. Wang, Ph.D., P.E.
Michael DiDiego Draft Personal Research Opinion Paper
The Final Passage - Grief and Loss
How many candies are there in my box?
Properties Of Water And Sea Water
Muscle structure and contraction
Increasing Tobacco Excise Tax
MERS-CoV & other viruses transmitted by respiratory system
Introduction to Smart Systems Analogue to Digital Conversion
Alabama College of Osteopathic Medicine Student Ambassador Program
Why do we need to know how to convert units in the metric system?
Viral and Immune System Dynamics of HIV-1, CD4+ T Cells and Macrophages during the Acute, Clinically Latent and Late Phases of HIV Infection Nargesalsadat.
Fire Ground Description: Structure Fire and Hostile Fire Event
Regional Market Characteristics and Preferential Trade Agreements
Research That Informs the 2011 – 2013 Edition of the QM RubricTM
ISLAMIC BANKING AND FINANCE:
Working with the Maths Hub
MIT Amorphous Materials 6: Glass Shaping
Jeopardy: Imperialism, Progressivism & WWI
Spanish-American War.
Creative writing Pathway Subject(s): VCE English, English Language, Literature Possible Partner Subject(s): Literature, Journalism.
Modes of climate Variability
Computer and Robot Vision I
Skipton Girls’ High School
Formal Abstractions for Attested Execution Secure Processors
Energy Technology Investment Decision-Making under Multi-Dimensional Price Risk: The Case of CCS and Carbon Capture Readiness Reinhard Madlener1 and Wilko.
Math 2 Warm Up 2x2 – 4x(3x – 5) 3x(x – 2) (x – 2)(x + 5)
BASIC PROFESSIONAL TRAINING COURSE Module I Nuclear physics and reactor theory Version 1a, September 2014 This material was prepared by the IAEA.
TUNED AMPLIFIERS • Amplifiers which amplify a specific frequency or narrow band of frequencies are called tuned amplifiers. Tuned amplifiers are mostly.
FAN5903: 3/6MHz Buck Converter for 3G, 3.5G & 4G PAs
Dr. Sinan Bahjat M B Ch B, M Sc, F I B M S
Volume 7, Issue 10, Pages (October 2010)
WATER AND WATER ACTIVITY
Jason Zhang, Senior Principal Statistician
Electromagnetic Potentials
Wind derivatives pricing issues Yeny E. Rodríguez Ramos
Cutout RL (reinforcement learning)
What is the domain? What is the range? Lesson 6.3 Alg-1
Perimeter and Area Perimeter – distance around a figure (one dimension) Measured using linear units (ft, in, m, cm, etc) Area – space taken up by a figure.
Foundation design for high rise building
Bellwork Measurements are important in both science and our everyday lives. Please list 10 measurements that we use (Within science or in daily activities)
Summary Talk PN Pairing and Quartet Correlations in Nuclei
FROM RISK MANAGEMENT TO QUANTITATIVE
Silvestro Roberto Poccia
Alignment of biological sequences
Java for Beginners Level 6 University Greenwich Computing At School
Two-dimensional arrays
Lists in Python.
Presentation transcript:

Lists in Python Parallel lists

Parallel lists This is a technique for using lists which goes back to the early days of programming It’s not new syntax, just a slightly different way to look at arrays Many languages have a restriction that an array can be only one type, an integer array, a string array, etc.

Sometimes the situation required storing both floats and strings, for example (GPAs and names). One piece of data, a GPA, belongs with another piece of data, a name. Since they could not be put in the same array, they were put in separate arrays, but in the same position.

Parallel arrays By using the same subscript for both arrays, you are referring to related data. The main thing to remember is if you move data around in one of the arrays, you must make the same moves in the other array Nothing in the language enforces this relationship, it’s up to your programming