Learn Without Walls

Python Glossary

33 essential Python programming terms — from variables and functions to loops and data structures — in English, Arabic, and Spanish.

A B C D E F I L M N O P R S T V W

A

EN Algorithm

A step-by-step set of instructions for solving a problem or completing a task. Algorithms are the logical backbone of every program — they describe exactly what the computer should do and in what order. A recipe is a real-world analogy for an algorithm.

AR الخوارزمية

مجموعة من التعليمات المتسلسلة لحل مسألة أو إتمام مهمة. تُشكّل الخوارزميات العمود الفقري المنطقي لكل برنامج، إذ تصف بدقة ما يجب أن يفعله الحاسوب وبأي ترتيب. والوصفة الطبخية مثال من الحياة اليومية يشابه الخوارزمية.

ES Algoritmo

Un conjunto de instrucciones paso a paso para resolver un problema o completar una tarea. Los algoritmos son la columna vertebral lógica de todo programa — describen exactamente qué debe hacer la computadora y en qué orden. Una receta de cocina es una analogía del mundo real para un algoritmo.

EN Argument

The actual value you pass to a function when calling it. When you define a function, you name the inputs as parameters; when you call the function, you supply arguments that fill those parameter slots. The terms "argument" and "parameter" are often used interchangeably, but technically arguments are passed at call time.

def greet(name): # name is the parameter print("Hello", name) greet("Safaa") # "Safaa" is the argument
AR الوسيط

القيمة الفعلية التي تمررها إلى دالة عند استدعائها. عند تعريف الدالة، تُسمّي المدخلات معاملات؛ وعند استدعاء الدالة، تُمرّر وسائط تملأ تلك المعاملات. يُستخدم مصطلحا "الوسيط" و"المعامل" عادةً بشكل تبادلي، لكن تقنيًا تُمرَّر الوسائط وقت الاستدعاء.

ES Argumento

El valor real que se pasa a una función al llamarla. Al definir una función, se nombran las entradas como parámetros; al llamar la función, se suministran argumentos que llenan esos parámetros. Los términos "argumento" y "parámetro" se usan a menudo de forma intercambiable, pero técnicamente los argumentos se pasan en el momento de la llamada.

B

EN Boolean

A data type with only two possible values: True or False. Booleans are the result of comparison operations (e.g., 5 > 3 evaluates to True) and control the flow of conditional statements and loops. Named after mathematician George Boole.

is_raining = True is_sunny = False print(5 > 3) # True print(2 == 7) # False
AR القيمة المنطقية (Boolean)

نوع بيانات لا يأخذ سوى قيمتين ممكنتين: True (صحيح) أو False (خطأ). تنشأ القيم المنطقية من عمليات المقارنة (مثلًا: 5 > 3 تُعطي True) وتتحكم في تدفق العبارات الشرطية والحلقات. سُمّيت هذه القيم نسبةً إلى الرياضي جورج بول.

ES Booleano

Un tipo de dato con solo dos valores posibles: True o False. Los booleanos son el resultado de operaciones de comparación (p. ej., 5 > 3 se evalúa como True) y controlan el flujo de instrucciones condicionales y bucles. Su nombre proviene del matemático George Boole.

EN Bug

An error in a program that causes it to behave unexpectedly or produce incorrect results. Bugs can be syntax errors (the code is written incorrectly), logic errors (the code runs but gives wrong output), or runtime errors (the code crashes during execution). Finding and fixing bugs is called debugging.

AR الخطأ البرمجي (Bug)

خطأ في البرنامج يجعله يتصرف بشكل غير متوقع أو يُنتج نتائج غير صحيحة. يمكن أن تكون الأخطاء البرمجية: أخطاء صياغية (الكود مكتوب بشكل خاطئ)، أو أخطاء منطقية (الكود يعمل لكنه يُخرج نتائج خاطئة)، أو أخطاء في وقت التشغيل (الكود ينهار أثناء التنفيذ). ويُسمى إيجاد هذه الأخطاء وإصلاحها "تصحيح الأخطاء".

ES Error (Bug)

Un error en un programa que hace que se comporte de manera inesperada o produzca resultados incorrectos. Los bugs pueden ser errores de sintaxis (el código está mal escrito), errores lógicos (el código se ejecuta pero da salida incorrecta) o errores en tiempo de ejecución (el código falla durante la ejecución). Encontrar y corregir bugs se llama depuración.

C

EN Class

A blueprint for creating objects. A class defines attributes (data) and methods (functions) that all objects of that type will have. Classes are the foundation of object-oriented programming (OOP). Think of a class as a cookie cutter and objects as the actual cookies.

class Dog: def __init__(self, name): self.name = name def bark(self): print(self.name, "says Woof!") my_dog = Dog("Rex") my_dog.bark() # Rex says Woof!
AR الصنف (Class)

مخطط لإنشاء الكائنات. يُعرّف الصنف الخصائص (البيانات) والأساليب (الدوال) التي ستمتلكها جميع كائنات ذلك النوع. تُشكّل الأصناف أساس البرمجة الكائنية (OOP). فكّر في الصنف كقالب لقطع الكعك، والكائنات كقطع الكعك الفعلية.

ES Clase

Un plano para crear objetos. Una clase define atributos (datos) y métodos (funciones) que todos los objetos de ese tipo tendrán. Las clases son la base de la programación orientada a objetos (POO). Piensa en una clase como un cortador de galletas y en los objetos como las galletas reales.

EN Conditional (if/elif/else)

A control structure that executes different blocks of code based on whether a condition is True or False. Python uses if, elif (else if), and else keywords. Conditionals allow programs to make decisions.

grade = 85 if grade >= 90: print("A") elif grade >= 80: print("B") else: print("C or below")
AR الجملة الشرطية (if/elif/else)

بنية تحكمية تُنفّذ كتلًا مختلفة من الكود بناءً على ما إذا كان الشرط صحيحًا أم لا. تستخدم بايثون الكلمات المفتاحية if وelif (else if) وelse. تُتيح الجمل الشرطية للبرامج اتخاذ القرارات.

ES Condicional (if/elif/else)

Una estructura de control que ejecuta diferentes bloques de código según si una condición es True o False. Python usa las palabras clave if, elif (else if) y else. Los condicionales permiten a los programas tomar decisiones.

D

EN Data Type

The classification of a value that tells Python what kind of data it is and what operations are valid for it. Common Python data types include int (integer), float (decimal), str (string/text), bool (True/False), list, dict, and tuple.

type(42) # int type(3.14) # float type("hello") # str type(True) # bool
AR نوع البيانات

تصنيف القيمة الذي يُخبر بايثون بنوع البيانات التي تتضمنها وما هي العمليات الصحيحة التي يمكن تطبيقها عليها. تشمل أنواع البيانات الشائعة في بايثون: int (الأعداد الصحيحة)، وfloat (الأعداد العشرية)، وstr (النصوص)، وbool (صحيح/خطأ)، وlist، وdict، وtuple.

ES Tipo de dato

La clasificación de un valor que le dice a Python qué tipo de dato es y qué operaciones son válidas. Los tipos de datos comunes en Python incluyen int (entero), float (decimal), str (cadena/texto), bool (True/False), list, dict y tuple.

EN DataFrame

A two-dimensional, table-like data structure from the pandas library, with labeled rows and columns. DataFrames are the primary way to work with structured data in Python data science workflows — similar to a spreadsheet or SQL table in code form.

import pandas as pd df = pd.DataFrame({"name": ["Ana", "Bob"], "age": [22, 30]}) print(df)
AR إطار البيانات (DataFrame)

بنية بيانات ثنائية الأبعاد تشبه الجدول، من مكتبة pandas، تتضمن صفوفًا وأعمدةً مُسمّاة. تُعدّ DataFrames الطريقة الرئيسية للتعامل مع البيانات المنظّمة في سير عمل علم البيانات بلغة بايثون — مشابهة لجدول البيانات أو جدول SQL بشكل كودي.

ES DataFrame

Una estructura de datos bidimensional similar a una tabla de la biblioteca pandas, con filas y columnas etiquetadas. Los DataFrames son la forma principal de trabajar con datos estructurados en flujos de trabajo de ciencia de datos en Python — similar a una hoja de cálculo o tabla SQL en forma de código.

EN Dictionary

A Python data structure that stores key-value pairs. Each key is unique and maps to a corresponding value. Dictionaries are enclosed in curly braces and allow fast lookup by key. They are useful for storing structured, labeled data.

student = {"name": "Safaa", "grade": 95, "city": "LA"} print(student["name"]) # Safaa student["grade"] = 98 # update a value
AR القاموس (Dictionary)

بنية بيانات في بايثون تخزّن أزواج المفتاح-القيمة. كل مفتاح فريد ويُربط بقيمة مقابلة. تُحاط القواميس بأقواس معقوصة وتُتيح البحث السريع بالمفتاح. وهي مفيدة لتخزين البيانات المنظّمة ذات التسميات.

ES Diccionario

Una estructura de datos de Python que almacena pares clave-valor. Cada clave es única y se asocia a un valor correspondiente. Los diccionarios se encierran en llaves y permiten búsquedas rápidas por clave. Son útiles para almacenar datos estructurados y etiquetados.

E

EN Exception

An error that occurs during program execution, interrupting the normal flow. Python raises exceptions when something goes wrong (e.g., dividing by zero, accessing a missing key). You can handle exceptions gracefully using try/except blocks instead of letting the program crash.

try: result = 10 / 0 except ZeroDivisionError: print("Cannot divide by zero!")
AR الاستثناء (Exception)

خطأ يحدث أثناء تشغيل البرنامج يقاطع سير التنفيذ الطبيعي. تُثير بايثون الاستثناءات عندما يحدث خطأ ما (مثل: القسمة على صفر، أو الوصول إلى مفتاح غير موجود). يمكنك التعامل مع الاستثناءات بأناقة باستخدام كتل try/except بدلًا من السماح للبرنامج بالانهيار.

ES Excepción

Un error que ocurre durante la ejecución del programa, interrumpiendo el flujo normal. Python genera excepciones cuando algo sale mal (p. ej., dividir entre cero, acceder a una clave inexistente). Puedes manejar excepciones con gracia usando bloques try/except en lugar de dejar que el programa falle.

F

EN Float

A Python data type representing decimal (floating-point) numbers. Floats are used when precision beyond whole numbers is needed — for example, 3.14, -0.5, or 100.0. Most mathematical and scientific calculations in Python use floats.

pi = 3.14159 temperature = -2.5 print(type(pi)) # <class 'float'>
AR العدد العشري (Float)

نوع بيانات في بايثون يمثّل الأعداد العشرية (ذات الفاصلة المتحركة). تُستخدم الأعداد العشرية عندما تكون هناك حاجة إلى دقة تتجاوز الأعداد الصحيحة — مثلًا: 3.14، أو −0.5، أو 100.0. تستخدم معظم الحسابات الرياضية والعلمية في بايثون الأعداد العشرية.

ES Flotante (Float)

Un tipo de dato de Python que representa números decimales (de punto flotante). Los flotantes se usan cuando se necesita precisión más allá de los números enteros — por ejemplo, 3.14, -0.5 o 100.0. La mayoría de los cálculos matemáticos y científicos en Python usan flotantes.

EN For Loop

A loop that iterates over each item in a sequence (such as a list, range, or string) and executes a block of code for each item. For loops are the most common way to repeat actions a known number of times or process every element in a collection.

fruits = ["apple", "banana", "cherry"] for fruit in fruits: print(fruit) for i in range(5): print(i) # 0, 1, 2, 3, 4
AR حلقة for

حلقة تكرار تمر على كل عنصر في تسلسل (كقائمة أو نطاق أو سلسلة نصية) وتُنفّذ كتلة من الكود لكل عنصر. تُعدّ حلقات for الطريقة الأكثر شيوعًا لتكرار الإجراءات عددًا معروفًا من المرات أو معالجة كل عنصر في مجموعة.

ES Bucle for

Un bucle que itera sobre cada elemento de una secuencia (como una lista, rango o cadena) y ejecuta un bloque de código para cada elemento. Los bucles for son la forma más común de repetir acciones un número conocido de veces o procesar cada elemento en una colección.

EN Function

A named, reusable block of code that performs a specific task. Functions are defined with the def keyword and called by name. They can accept inputs (parameters) and return outputs (return values). Functions reduce repetition and make code organized and readable.

def add_numbers(a, b): result = a + b return result total = add_numbers(3, 7) print(total) # 10
AR الدالة (Function)

كتلة من الكود قابلة لإعادة الاستخدام تحمل اسمًا وتؤدي مهمة محددة. تُعرَّف الدوال باستخدام الكلمة المفتاحية def وتُستدعى بالاسم. يمكنها قبول مدخلات (معاملات) وإرجاع مخرجات (قيم مُعادة). تُقلّل الدوال من التكرار وتجعل الكود منظمًا وسهل القراءة.

ES Función

Un bloque de código reutilizable con nombre que realiza una tarea específica. Las funciones se definen con la palabra clave def y se llaman por nombre. Pueden aceptar entradas (parámetros) y devolver salidas (valores de retorno). Las funciones reducen la repetición y hacen el código organizado y legible.

I

EN Import

The process of loading an external module or library into your Python script so you can use its functions and tools. Python has a vast standard library and thousands of third-party packages (like pandas, NumPy, matplotlib) that you bring in with import.

import math import pandas as pd from random import randint print(math.sqrt(16)) # 4.0
AR الاستيراد (Import)

عملية تحميل وحدة أو مكتبة خارجية في نص بايثون البرمجي لاستخدام دوالها وأدواتها. تمتلك بايثون مكتبة قياسية ضخمة وآلاف الحزم الخارجية (كـ pandas وNumPy وmatplotlib) التي تُستورد باستخدام import.

ES Importar

El proceso de cargar un módulo o biblioteca externa en tu script de Python para poder usar sus funciones y herramientas. Python tiene una vasta biblioteca estándar y miles de paquetes de terceros (como pandas, NumPy, matplotlib) que se traen con import.

EN Index

The position of an item within a sequence (list, string, or tuple). Python uses zero-based indexing, meaning the first element is at index 0, the second at index 1, and so on. Negative indices count from the end (-1 is the last element).

colors = ["red", "green", "blue"] print(colors[0]) # red print(colors[-1]) # blue
AR الفهرس (Index)

موضع عنصر ما داخل تسلسل (قائمة أو سلسلة نصية أو صف). تستخدم بايثون الفهرسة الصفرية، بمعنى أن العنصر الأول يكون في الفهرس 0، والثاني في الفهرس 1، وهكذا. تعدّ الفهارس السالبة من النهاية (−1 هو العنصر الأخير).

ES Índice

La posición de un elemento dentro de una secuencia (lista, cadena o tupla). Python usa indexación de base cero, lo que significa que el primer elemento está en el índice 0, el segundo en el índice 1, etc. Los índices negativos cuentan desde el final (-1 es el último elemento).

EN Integer

A Python data type representing whole numbers (positive, negative, or zero) with no decimal point. Integers support standard arithmetic operations and can be arbitrarily large in Python with no overflow issues.

count = 10 negative = -7 print(type(count)) # <class 'int'>
AR العدد الصحيح (Integer)

نوع بيانات في بايثون يمثّل الأعداد الصحيحة (موجبة أو سالبة أو صفر) بلا فاصلة عشرية. تدعم الأعداد الصحيحة العمليات الحسابية القياسية ويمكن أن تكون كبيرة بشكل اعتباطي في بايثون دون مشاكل الفيضان.

ES Entero (Integer)

Un tipo de dato de Python que representa números enteros (positivos, negativos o cero) sin punto decimal. Los enteros admiten operaciones aritméticas estándar y pueden ser arbitrariamente grandes en Python sin problemas de desbordamiento.

EN Iteration

The process of repeating a block of code multiple times, typically by going through each item in a collection or running until a condition is met. Python achieves iteration with for loops (over sequences) and while loops (condition-based).

AR التكرار (Iteration)

عملية تكرار كتلة من الكود مرات متعددة، عادةً بالمرور على كل عنصر في مجموعة أو التشغيل حتى يتحقق شرط ما. تتحقق بايثون التكرار من خلال حلقات for (عبر التسلسلات) وحلقات while (المستندة إلى الشروط).

ES Iteración

El proceso de repetir un bloque de código múltiples veces, típicamente recorriendo cada elemento de una colección o ejecutando hasta que se cumpla una condición. Python logra la iteración con bucles for (sobre secuencias) y bucles while (basados en condición).

L

EN Library

A collection of pre-written modules and functions that extend Python's capabilities. Libraries save time by providing ready-made tools for common tasks. Key data science libraries include NumPy (numerical computing), pandas (data manipulation), and matplotlib (visualization).

import numpy as np import pandas as pd import matplotlib.pyplot as plt
AR المكتبة (Library)

مجموعة من الوحدات والدوال المكتوبة مسبقًا التي تُوسّع قدرات بايثون. توفر المكتبات أدوات جاهزة للمهام الشائعة مما يوفر الوقت. تشمل المكتبات الرئيسية لعلم البيانات: NumPy (الحوسبة الرقمية)، وpandas (معالجة البيانات)، وmatplotlib (التصور البياني).

ES Biblioteca (Library)

Una colección de módulos y funciones preescritos que amplían las capacidades de Python. Las bibliotecas ahorran tiempo al proporcionar herramientas listas para tareas comunes. Las bibliotecas clave de ciencia de datos incluyen NumPy (computación numérica), pandas (manipulación de datos) y matplotlib (visualización).

EN List

An ordered, mutable collection of items enclosed in square brackets. Lists can hold items of different data types and allow duplicate values. You can add, remove, and change items after creation. Lists are one of Python's most versatile and commonly used data structures.

grades = [95, 87, 92, 100, 78] grades.append(88) # add item print(grades[0]) # 95 (first item) print(len(grades)) # 6 (number of items)
AR القائمة (List)

مجموعة مرتبة قابلة للتعديل من العناصر تُحاط بأقواس مربعة. يمكن للقوائم أن تحتوي على عناصر من أنواع بيانات مختلفة وتسمح بالقيم المكررة. يمكنك إضافة العناصر وإزالتها وتغييرها بعد الإنشاء. تُعدّ القوائم من أكثر بنيات البيانات تنوعًا وشيوعًا في بايثون.

ES Lista

Una colección ordenada y mutable de elementos encerrados en corchetes. Las listas pueden contener elementos de diferentes tipos de datos y permiten valores duplicados. Puedes agregar, eliminar y cambiar elementos después de la creación. Las listas son una de las estructuras de datos más versátiles y usadas de Python.

M

EN Method

A function that belongs to an object and is called using dot notation (object.method()). Methods define the behavior of objects. For example, lists have methods like .append(), .sort(), and .remove(); strings have .upper(), .split(), and .strip().

name = " safaa " print(name.strip()) # "safaa" print(name.upper()) # " SAFAA " numbers = [3, 1, 2] numbers.sort() print(numbers) # [1, 2, 3]
AR الأسلوب / الطريقة (Method)

دالة تنتمي إلى كائن ما وتُستدعى باستخدام النقطة (object.method()). تُعرّف الأساليب سلوك الكائنات. مثلًا، تمتلك القوائم أساليب مثل .append() و.sort() و.remove()؛ وتمتلك السلاسل النصية أساليب مثل .upper() و.split() و.strip().

ES Método

Una función que pertenece a un objeto y se llama usando notación de punto (objeto.método()). Los métodos definen el comportamiento de los objetos. Por ejemplo, las listas tienen métodos como .append(), .sort() y .remove(); las cadenas tienen .upper(), .split() y .strip().

EN Module

A single Python file (.py) containing functions, classes, and variables that can be imported and used in other programs. Python's standard library is made up of many modules (e.g., math, random, os). Modules help organize large codebases into manageable pieces.

AR الوحدة (Module)

ملف بايثون واحد (.py) يحتوي على دوال وأصناف ومتغيرات يمكن استيرادها واستخدامها في برامج أخرى. تتألف المكتبة القياسية لبايثون من وحدات عديدة (مثل math وrandom وos). تساعد الوحدات على تنظيم قواعد الكود الكبيرة في أجزاء قابلة للإدارة.

ES Módulo

Un solo archivo Python (.py) que contiene funciones, clases y variables que pueden importarse y usarse en otros programas. La biblioteca estándar de Python está compuesta por muchos módulos (p. ej., math, random, os). Los módulos ayudan a organizar bases de código grandes en partes manejables.

N

EN None

Python's special value representing the absence of a value or a null result. Functions that don't explicitly return a value return None by default. None is its own data type (NoneType) and is often used to initialize variables before assigning a meaningful value.

result = None print(result is None) # True def no_return(): x = 5 print(no_return()) # None
AR لا شيء (None)

القيمة الخاصة في بايثون التي تمثل غياب قيمة أو نتيجة فارغة. الدوال التي لا تُعيد قيمة صريحة تُعيد None افتراضيًا. تمتلك None نوع بيانات خاصًا بها (NoneType) وكثيرًا ما تُستخدم لتهيئة المتغيرات قبل تعيين قيمة ذات معنى.

ES Nulo (None)

El valor especial de Python que representa la ausencia de un valor o un resultado nulo. Las funciones que no devuelven explícitamente un valor devuelven None por defecto. None tiene su propio tipo de dato (NoneType) y se usa a menudo para inicializar variables antes de asignar un valor significativo.

O

EN Object

An instance of a class. In Python, everything is an object — integers, strings, lists, and even functions. Objects have attributes (data stored inside them) and methods (functions they can perform). Object-oriented programming (OOP) organizes code around objects.

AR الكائن (Object)

نسخة من صنف (class). في بايثون، كل شيء هو كائن — الأعداد الصحيحة والسلاسل النصية والقوائم وحتى الدوال. تمتلك الكائنات خصائص (بيانات مخزّنة بداخلها) وأساليب (دوال يمكنها تنفيذها). تُنظّم البرمجة الكائنية الكود حول الكائنات.

ES Objeto

Una instancia de una clase. En Python, todo es un objeto — enteros, cadenas, listas e incluso funciones. Los objetos tienen atributos (datos almacenados en ellos) y métodos (funciones que pueden realizar). La programación orientada a objetos (POO) organiza el código alrededor de objetos.

P

EN Parameter

A named variable listed in a function's definition that acts as a placeholder for the values that will be passed in. When the function is called, actual values (arguments) are supplied for each parameter. Parameters let functions be flexible and reusable.

def multiply(x, y): # x and y are parameters return x * y multiply(4, 5) # 4 and 5 are arguments
AR المعامل (Parameter)

متغير مُسمّى مُدرَج في تعريف الدالة يعمل كعنصر نائب للقيم التي ستُمرَّر إليها. عند استدعاء الدالة، تُقدَّم قيم فعلية (وسائط) لكل معامل. تجعل المعاملات الدوال مرنة وقابلة لإعادة الاستخدام.

ES Parámetro

Una variable nombrada en la definición de una función que actúa como marcador de posición para los valores que se pasarán. Cuando se llama la función, se suministran valores reales (argumentos) para cada parámetro. Los parámetros hacen que las funciones sean flexibles y reutilizables.

EN Print

The built-in print() function displays output to the console (screen). It is one of the first things beginners learn in Python and is invaluable for debugging and checking the values of variables. You can print multiple values separated by commas.

print("Hello, World!") name = "Safaa" age = 30 print("Name:", name, "Age:", age)
AR الطباعة (Print)

الدالة المدمجة print() تعرض المخرجات على الشاشة (وحدة التحكم). وهي من أول الأشياء التي يتعلمها المبتدئون في بايثون، ولا تُقدَّر بثمن في تصحيح الأخطاء والتحقق من قيم المتغيرات. يمكنك طباعة قيم متعددة مفصولة بفواصل.

ES Imprimir (Print)

La función integrada print() muestra salida en la consola (pantalla). Es una de las primeras cosas que los principiantes aprenden en Python y es invaluable para depurar y verificar los valores de las variables. Puedes imprimir múltiples valores separados por comas.

R

EN Return

The return statement sends a value back from a function to the caller. Once a return is executed, the function stops running. Without a return statement, a function returns None. Returned values can be stored in variables or used in expressions.

def square(n): return n ** 2 result = square(6) print(result) # 36
AR الإرجاع (Return)

تُرسل عبارة return قيمة من الدالة إلى المُستدعي. بمجرد تنفيذ return، تتوقف الدالة عن التشغيل. بدون عبارة return، تُعيد الدالة None. يمكن تخزين القيم المُعادة في متغيرات أو استخدامها في التعبيرات.

ES Retornar (Return)

La declaración return envía un valor de regreso de una función al llamador. Una vez que se ejecuta un return, la función deja de ejecutarse. Sin una declaración return, una función devuelve None. Los valores retornados pueden almacenarse en variables o usarse en expresiones.

S

EN Set

An unordered collection of unique items enclosed in curly braces. Sets automatically remove duplicates and are useful for membership testing and set operations (union, intersection, difference). Unlike lists, sets have no guaranteed order.

fruits = {"apple", "banana", "apple", "cherry"} print(fruits) # {'apple', 'banana', 'cherry'} — no duplicates
AR المجموعة (Set)

مجموعة غير مرتبة من العناصر الفريدة تُحاط بأقواس معقوصة. تُزيل المجموعات تلقائيًا العناصر المكررة وهي مفيدة لاختبار العضوية وعمليات المجموعات (الاتحاد والتقاطع والفرق). وخلافًا للقوائم، لا يوجد للمجموعات ترتيب مضمون.

ES Conjunto (Set)

Una colección no ordenada de elementos únicos encerrados en llaves. Los conjuntos eliminan automáticamente duplicados y son útiles para pruebas de pertenencia y operaciones de conjuntos (unión, intersección, diferencia). A diferencia de las listas, los conjuntos no tienen un orden garantizado.

EN Slice

A way to extract a portion of a sequence (list, string, or tuple) using the syntax [start:stop:step]. Slicing returns a new sequence without modifying the original. It is one of Python's most powerful and convenient features for working with sequences.

numbers = [0, 1, 2, 3, 4, 5] print(numbers[1:4]) # [1, 2, 3] print(numbers[::2]) # [0, 2, 4] (every other) text = "Hello" print(text[::-1]) # "olleH" (reversed)
AR التقطيع (Slice)

طريقة لاستخراج جزء من تسلسل (قائمة أو سلسلة نصية أو صف) باستخدام الصيغة [start:stop:step]. يُعيد التقطيع تسلسلًا جديدًا دون تعديل الأصل. وهو أحد أكثر ميزات بايثون قوةً وملاءمةً للتعامل مع التسلسلات.

ES Rebanada (Slice)

Una forma de extraer una porción de una secuencia (lista, cadena o tupla) usando la sintaxis [inicio:fin:paso]. El slicing devuelve una nueva secuencia sin modificar la original. Es una de las características más poderosas y convenientes de Python para trabajar con secuencias.

EN String

A sequence of characters (letters, numbers, spaces, symbols) enclosed in single or double quotes. Strings are immutable — you can't change individual characters after creation. Python provides many built-in string methods for manipulating text.

greeting = "Hello, World!" print(len(greeting)) # 13 print(greeting.lower()) # "hello, world!" print(greeting[0:5]) # "Hello"
AR السلسلة النصية (String)

تسلسل من الأحرف (حروف وأرقام ومسافات ورموز) تُحاط بعلامات اقتباس مفردة أو مزدوجة. السلاسل النصية غير قابلة للتغيير — لا يمكنك تغيير الأحرف الفردية بعد الإنشاء. توفر بايثون أساليب سلاسل نصية مدمجة عديدة لمعالجة النصوص.

ES Cadena de texto (String)

Una secuencia de caracteres (letras, números, espacios, símbolos) encerrada en comillas simples o dobles. Las cadenas son inmutables — no puedes cambiar caracteres individuales después de crearlas. Python proporciona muchos métodos de cadena integrados para manipular texto.

EN Syntax

The set of rules that define how Python code must be written so the interpreter can understand it. Syntax errors occur when code violates these rules (e.g., missing a colon after an if statement, incorrect indentation). Python is strict about indentation — it uses whitespace to define code blocks.

AR بناء الجملة (Syntax)

مجموعة القواعد التي تُحدد كيفية كتابة كود بايثون لكي يستطيع المُفسِّر فهمه. تحدث أخطاء الصياغة عندما ينتهك الكود هذه القواعد (مثلًا: نسيان النقطتين بعد عبارة if، أو الإزاحة الخاطئة). بايثون صارمة في موضوع الإزاحة — إذ تستخدم المسافات البيضاء لتعريف كتل الكود.

ES Sintaxis

El conjunto de reglas que define cómo debe escribirse el código Python para que el intérprete pueda entenderlo. Los errores de sintaxis ocurren cuando el código viola estas reglas (p. ej., olvidar los dos puntos después de una instrucción if, sangría incorrecta). Python es estricto con la sangría — usa espacios en blanco para definir bloques de código.

T

EN Tuple

An ordered, immutable collection of items enclosed in parentheses. Like a list, tuples can hold mixed data types; unlike lists, their contents cannot be changed after creation. Tuples are faster than lists and are often used to store related pieces of data that shouldn't change.

coordinates = (34.05, -118.24) # (latitude, longitude) print(coordinates[0]) # 34.05
AR الصف (Tuple)

مجموعة مرتبة غير قابلة للتعديل من العناصر تُحاط بأقواس هلالية. مثل القائمة، يمكن للصفوف أن تحتوي على أنواع بيانات مختلطة؛ وخلافًا للقوائم، لا يمكن تغيير محتوياتها بعد الإنشاء. الصفوف أسرع من القوائم وكثيرًا ما تُستخدم لتخزين بيانات مترابطة لا ينبغي تغييرها.

ES Tupla

Una colección ordenada e inmutable de elementos encerrados en paréntesis. Como una lista, las tuplas pueden contener tipos de datos mixtos; a diferencia de las listas, su contenido no puede cambiarse después de la creación. Las tuplas son más rápidas que las listas y se usan a menudo para almacenar datos relacionados que no deben cambiar.

V

EN Variable

A named storage location that holds a value in memory. In Python, you create a variable by assigning a value with the = operator — no type declaration needed. Variables can be reassigned to new values (even of different types) at any time.

name = "Safaa" # string variable age = 30 # integer variable gpa = 3.95 # float variable is_student = True # boolean variable age = age + 1 # reassignment print(age) # 31
AR المتغير (Variable)

موقع تخزين مُسمّى يحمل قيمة في الذاكرة. في بايثون، تُنشئ متغيرًا بتعيين قيمة باستخدام عامل = — دون الحاجة إلى التصريح بالنوع. يمكن إعادة تعيين المتغيرات بقيم جديدة (حتى من أنواع مختلفة) في أي وقت.

ES Variable

Una ubicación de almacenamiento con nombre que guarda un valor en memoria. En Python, creas una variable asignando un valor con el operador = — sin necesidad de declarar el tipo. Las variables pueden reasignarse a nuevos valores (incluso de diferentes tipos) en cualquier momento.

W

EN While Loop

A loop that continues executing as long as a specified condition remains True. Unlike a for loop (which iterates over a known sequence), a while loop is used when the number of repetitions is not known in advance. Always ensure the condition will eventually become False to avoid infinite loops.

count = 0 while count < 5: print(count) count += 1 # increment to avoid infinite loop # prints: 0, 1, 2, 3, 4
AR حلقة while

حلقة تواصل التنفيذ طالما ظل الشرط المُحدد صحيحًا. وخلافًا لحلقة for (التي تكرر عبر تسلسل معروف)، تُستخدم حلقة while عندما لا يُعرف عدد التكرارات مسبقًا. تأكد دائمًا من أن الشرط سيصبح خاطئًا في نهاية المطاف لتجنب الحلقات اللانهائية.

ES Bucle while

Un bucle que continúa ejecutándose mientras una condición especificada permanezca True. A diferencia de un bucle for (que itera sobre una secuencia conocida), un bucle while se usa cuando el número de repeticiones no se conoce de antemano. Asegúrate siempre de que la condición eventualmente se vuelva False para evitar bucles infinitos.