🌀 التكرار على Tuples باستخدام الحلقات في بايثون 🔹 الـ Tuple مثل القائمة، يمكن التكرار عليها باستخدام for، لكن تذكّر: لا يمكن تعديل عناصرها. --- ✅ مثال 1 – طباعة كل عنصر: my_tuple = ("apple", "banana", "cherry") for item in my_tuple: print(item) 🔸 النتيجة: apple
banana
cherry --- ✅ مثال 2 – التكرار مع الفهرس: my_tuple = ("red", "green", "blue") for i in range(len(my_tuple)): print("Index", i, "=", my_tuple[i]) 🔸 النتيجة: Index 0 = red
Index 1 = green
Index 2 = blue --- 🧩...