Data Structures - PR - 01
Welcome, Eng!
Python Recall Session: Your Quick Reference Guide
This session is designed to serve as a quick recall resource for Python concepts. My aim is not to dive deep into topics but to provide a concise overview that allows you to efficiently refresh your knowledge. This guide will help you recall key Python concepts with minimal effort, making your learning process more efficient.
Stay tuned for a streamlined and effective recall experience!
Following topics will be covered, and will be adding more as necessary
Basic Syntax and Data Structures:
Variables and Data Types
Lists, Tuples, Dictionaries, and Sets
Variables and Data Types:
You create a variable by assigning a value to it using the =
operator.
writter_name = "Kunaal"
age = 27
is_sdet = True
Data Types:
Data types define the kind of data a variable can hold. Here are some common ones:
Integers (int):
Whole numbers, positive or negative.
Example:
amount = 2700amount = -200
Floating-Point Numbers (float):
Numbers with a decimal point.
Example:
amount = 3.14amount =-0.001
Strings (str):
Sequence of characters enclosed in quotes.
Example:
name="hello"position ='SDET/qa'
Booleans (bool):
Represents
True
orFalse
.Example:
is_sdet = True
Lists:
Ordered items, can be of different types, mutable*(values can be changed)*.
Example:
value = [100, 250, 327]stocks=["apple", "google", "tesla"]
Tuples:
Ordered items, but immutable (values cannot be changed).
Example:
employee_ids = (1, 2, 3)certificates =("first aid", "cpr")
Dictionaries (dict):
Collection of key-value pairs.
Example:
portfolio = {"company": "Apple", "owned_shares": 215}
Sets:
Unordered unique items only.
Example:
unique_numbers ={1, 2, 3}fruits ={"apple", "banana", "cherry"}
Stay tuned, next chapter would be String manipulation
Subscribe to my newsletter
Read articles from Kunaal Thanik directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by