Data structures

How it works under the hood

  • List

These are examples of sequence and they have membership test e.g. in or not in. Apple in fruits.

For list and tuple these are O(n)

For set and dict it’s O(1) since they use hashing

There are three control flow statements in Python — if, for and while.

The continue statement is used to tell Python to skip the rest of the statements in the current loop block and to continue to the next iteration of the loop.

The break statement is used to break out of a loop statement i.e. stop the execution of a looping statement, even if the loop condition has not become False or the sequence of items has not been completely iterated over.

An important note is that if you break out of a for or while loop, any corresponding loop else block is not executed.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Lean QA (aka QA Ops)

Git: Only if I hadn’t ignored this tool.

Faster Fibonacci

Data modeling ! But for your five years old kid

Who is the most valuable software engineer?

What is the tmpnam function in C ?

Using Kanban for Small Teams

Image by <a href=”;utm_medium=referral&amp;utm_campaign

Get insights on PostgreSQL data with Azure Sentinel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Natarajan Santhosh

Natarajan Santhosh

More from Medium

Python Dictionary Comprehensions

Python Programming for Beginners Part -15

Beginners friendly Python basics

Pandas functions every Data Scientist should know (part 3)