PythonPython · Chapterبەش 6 · Lectureوانە 6.1
Working with Stringsکارکردن لەگەڵ زنجیرەنووسەکان
Text in Python: measure strings with len(), read characters by index, take slices, join and search them, use string methods, and compare strings — including why "A" < "a" is True and how Kurdish letters compare.
دەق لە : پێوانی بە len()، خوێندنەوەی بە ، ، و گەڕان تێیاندا، و بەراوردکردنی — لەگەڵ ئەوەی بۆچی "A" < "a" ڕاستە و پیتە کوردییەکان چۆن بەراورد دەکرێن.
What you will learnچی فێر دەبیت
- Read single characters and slices of a string with positive and negative indexes.
- Explain why strings are immutable and build a new string instead of changing one.
- Join, repeat and search strings, and use the common string methods.
- Use the case, test (
is…()) and search methods, and choose betweenfind()andindex(). - Predict the result of comparing two strings using code points, and compare without caring about case.
- و بەشەکانی بە موجەب و بخوێنیتەوە.
- ڕوونی بکەیتەوە بۆچی و لەبری گۆڕین نوێ دروست بکەیت.
- بلکێنیت، دووبارەیان بکەیتەوە و تێیاندا بگەڕێیت و باوترین بەکار بهێنیت.
- گەورە و بچووکی پیت، پشکنین (
is…()) و گەڕان بەکار بهێنیت و لە نێوانfind()وindex()دا هەڵبژێریت. - ئەنجامی بەراوردکردنی دوو بە یارمەتیی پێشبینی بکەیت و بەبێ گرنگیدان بە گەورە و بچووکی پیت بەراورد بکەیت.
Text in Python: stringsدەق لە Pythonـدا: زنجیرەنووسەکان
In Python, every piece of text is a string (type str): a row of characters between quotes. A character can be a letter, a digit, a space, a sign such as !, or a Kurdish letter. Single quotes 'Hawler' and double quotes "Hawler" make exactly the same string, so pick one style and keep it.
لە هەر پارچە دەقێک (جۆری str): ڕیزێک لە نێوان دوو . دەکرێت پیتێک، ژمارەیەک، ، هێمایەکی وەک ! یان پیتێکی کوردی بێت. 'Hawler' و "Hawler" ڕێک هەمان ؛ بۆیە یەکێک لە دوو شێوازەکە هەڵبژێرە و لەسەری بەردەوام بە.
The built-in function len() counts the characters of a string. Spaces and signs count too, and the empty string "" has length 0.
len() دەژمێرێت. و هێماکانیش دەژمێردرێن؛ بەتاڵ "" درێژییەکەی 0ە.
len()length.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسەcity = "Hawler"
print(city)
print(len(city))
print(len("Hello, Kurdistan!"))
print(len(""))Hawler 6 17 0
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1
A variable that holds a string.
کە هەڵدەگرێت.
- Lineدێڕی 3
len()returns the number of characters: 6.len()ژمارەی دەگەڕێنێتەوە: 6.- Lineدێڕی 5
The empty string has no characters at all.
بەتاڵ هیچ تێدا نییە.
A string is like a tasbih (prayer beads): beads in a fixed order on one thread. Each bead is one character, and you can count them.
وەک تەزبیحێک وایە: دەنکەکان بە ڕیزێکی دیاریکراو بە یەک داوەوەن. هەر دەنکێک و دەتوانیت بیانژمێریت.
Where the analogy stops workingسنووری ئەم نموونەیە
On a real tasbih you could replace one bead. A Python string can never be changed: you build a new string instead (see Strings cannot be changed).
لە تەزبیحی ڕاستەقینەدا دەتوانیت دەنکێک بگۆڕیت. بەڵام هەرگیز ناگۆڕدرێت: لەبری ئەوە نوێ دروست دەکەیت (بڕوانە زنجیرەنووسەکان ناگۆڕدرێن).
In Kurdish: working with strings in Python, including indexes and string functions.
بە کوردی: کارکردن لەگەڵ لە ، لەوانە و .
Kurdish (Sorani), whole video (14:01): part 5 of MR. Ant's Python course.
ڤیدیۆیەکی کوردی (سۆرانی)، هەموو ڤیدیۆکە (14:01): بەشی 5 لە کۆرسی MR. Ant.
Every character has an indexهەر نووسەیەک ئیندێکسێکی هەیە
Each character has a position number called its index. Python counts from 0, not from 1: the first character is word[0], the second is word[1]. So the last index is always len(word) - 1. The picture shows the indexes of "PYTHON".
هەر ژمارەی شوێنێکی هەیە کە پێی دەوترێت . لە 0ەوە دەژمێرێت، نەک لە 1: یەکەم word[0]ە و دووەمیان word[1]. بۆیە دوایین هەمیشە len(word) - 1ە. وێنەکە "PYTHON" پیشان دەدات.
word = "PYTHON"
print(word[0])
print(word[1])
print(word[5])
print(word[len(word) - 1])P Y N N
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 4-5
Index 5 is the last one, because the length is 6.
len(word) - 1works for a string of any length.5 دوایینە، چونکە درێژییەکە 6ە.
len(word) - 1بۆ هەر درێژییەک کار دەکات.
There is no character at index 6. Asking for it stops the program with an IndexError:
لە 6دا هیچ نییە. داواکردنی ئەو بە IndexError دەوەستێنێت:
word = "PYTHON"
print(word[6])Traceback (most recent call last):
File "index_error.py", line 2, in <module>
print(word[6])
~~~~^^^
IndexError: string index out of rangeEvery character has an indexهەر نووسەیەک ئیندێکسێکی هەیە
Counting from the endژماردن لە کۆتاییەوە
Python can also count from the end with negative indexes: word[-1] is the last character, word[-2] the one before it, and word[-len(word)] is the first. Inside, Python just adds the length: word[-1] means word[len(word) - 1]. It is the easiest way to reach the last character without len().
دەتوانێت لە کۆتاییشەوە بژمێرێت، بە : word[-1] دوایین ، word[-2] ئەوەی پێش ئەوە و word[-len(word)] یەکەمیانە. لە ناوەوە تەنها درێژییەکە زیاد دەکات: word[-1] واتە word[len(word) - 1]. ئەمە ئاسانترین ڕێگەیە بۆ گەیشتن بە دوایین بەبێ len().
word = "PYTHON"
print(word[-1])
print(word[-2])
print(word[-6])N O P
Slicing: taking part of a stringلەتکردن: وەرگرتنی بەشێک لە زنجیرەنووسەیەک
A slice word[start:stop] gives the characters from index start up to, but not including, index stop. So word[1:4] takes indexes 1, 2 and 3 (see the picture above). Leave out start to begin at 0; leave out stop to go to the end. A third number is a step: word[::2] takes every second character and word[::-1] walks backwards, which reverses the string.
بە word[start:stop] دەدات کە لە startەوە دەست پێدەکەن تا stop، بەڵام خودی stop تێدا نییە. بۆیە word[1:4] 1، 2 و 3 وەردەگرێت (وێنەکەی سەرەوە ببینە). ئەگەر start نەنووسیت لە 0ەوە دەست پێدەکات؛ ئەگەر stop نەنووسیت تا کۆتایی دەڕوات. ژمارەی سێیەم هەنگاوە: word[::2] وەردەگرێت و یەکێک جێدەهێڵێت (یەکەم، سێیەم، پێنجەم…) و word[::-1] بە پێچەوانەوە دەڕوات، واتە هەڵدەگەڕێنێتەوە.
word = "PYTHON"
print(word[1:4])
print(word[:2])
print(word[2:])
print(word[-3:])
print(word[:2] + word[2:])
print(word[4:42])
print(word[42:] == "")
print(word[::2])
print(word[::-1])YTH PY THON HON PYTHON ON True PTO NOHTYP
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
Indexes 1, 2, 3. Index 4 is the stop and is left out.
1، 2 و 3. 4 کۆتاییە و دەرەوە دەمێنێتەوە.
- Lineدێڕی 6
word[:i] + word[i:]always gives the whole string back.word[:i] + word[i:]هەمیشە هەموو دەداتەوە.- Lineدێڕی 7-8
Slices never raise
IndexError: a stop past the end is cut to the end, and a start past the end gives the empty string.هەرگیز
IndexErrorنادات: کۆتاییەک کە لە دوای بێت تا کۆتایی کورت دەکرێتەوە و دەستپێکێک لە دوای کۆتایی بەتاڵ دەدات.- Lineدێڕی 10
A step of
-1walks from the end to the start.هەنگاوی
-1لە کۆتاییەوە بەرەو سەرەتا دەڕوات.
Taking characters and parts of a string with [start:end:step], negative indexes, and reversing a string with [::-1].
وەرگرتنی و پارچەکانی بە [start:end:step]، و پێچەوانەکردنەوەی بە [::-1].
Whole video (7:27). Bro calls all of this "indexing"; it covers single indexes, slices, negative indexes and steps.
هەموو ڤیدیۆکە (7:27). Bro هەموو ئەمانە ناو دەنێت indexing: تاکە ، ، و هەنگاو.
Strings cannot be changedزنجیرەنووسەکان ناگۆڕدرێن
Strings are immutable: once a string exists, none of its characters can be changed. Trying to put a new character at an index gives a TypeError.
: کاتێک دروست بوو، هیچ ناگۆڕدرێت. هەوڵدان بۆ دانانی نوێ لە TypeError دەدات.
word = "Python"
word[0] = "J"Traceback (most recent call last):
File "change.py", line 2, in <module>
word[0] = "J"
~~~~^^^
TypeError: 'str' object does not support item assignmentInstead, build a new string from pieces of the old one and store it. The old string is not touched.
لەبری ئەوە، نوێ لە پارچەکانی کۆنەکە دروست بکە و هەڵیبگرە. دەستی لێ نادرێت.
word = "Python"
new_word = "J" + word[1:]
print(new_word)
print(word)Jython Python
This is also why string methods never change the string they belong to: they give back a new string (next screens).
ئەمە هۆکاری ئەوەشە کە هەرگیز ئەو ناگۆڕن کە بانگیان دەکات: نوێ دەگەڕێننەوە (لە شاشەکانی دواتردا).
Joining, repeating and searching with inپێکەوەلکاندن، دووبارەکردنەوە و گەڕان بە in
You already met two operators on strings in Operators and expressions: + joins two strings (concatenation) and * repeats a string. Remember that + joins strings only: a number must first become text with str() (or use an f-string).
لە کارپێکەرەکان و دەربڕینەکان دوو ناسی: + دوو بەیەکەوە دەلکێنێت () و * دووبارە دەکاتەوە (). لەبیرت بێت + تەنها دەلکێنێت: ژمارە سەرەتا دەبێت بە str() بکرێت بە دەق (یان f-string بەکار بهێنە).
A third operator belongs to strings: in asks whether one string appears inside another, and not in asks the opposite. The answer is True or False, so it fits straight into an if. Like ==, it is case-sensitive.
سێیەم سەر بە : in دەپرسێت ئایا لە ناو تردا هەیە () و not in پێچەوانەکەی دەپرسێت. وەڵامەکە True یان Falseە، بۆیە ڕاستەوخۆ لە ناو ifـدا جێی دەبێتەوە. وەک ==، .
+، * و inoperators.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسەfirst = "Shilan"
last = "Aram"
print(first + " " + last)
print("-" * 20)
print("lan" in "Shilan")
print("x" in "Shilan")
print("Z" not in "Shilan")
print("shi" in "Shilan")Shilan Aram -------------------- True False True False
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 3
+adds no space by itself: put" "in between.+خۆی زیاد ناکات:" "بخەرە نێوانیان.- Lineدێڕی 5-7
inlooks for the whole piece of text anywhere inside the string.inبۆ هەموو پارچە دەقەکە لە هەر شوێنێکی ناو دەگەڕێت.- Lineدێڕی 8
"shi"is not inside"Shilan": smallsis not capitalS."shi"لە ناو"Shilan"دا نییە:sی بچووکSی گەورە نییە.
String methodsمیتۆدەکانی زنجیرەنووسە
A method is a function that belongs to a value. You call it with a dot after the value: text.upper(). String methods never change the original string (it is immutable); they return a new value, which you print or store.
کە سەر بە نرخێکە. بە خاڵێک لە دوای نرخەکەوە بانگی دەکەیت: text.upper(). هەرگیز ناگۆڕن (چونکە )؛ نرخێکی نوێ دەگەڕێننەوە کە چاپی دەکەیت یان هەڵیدەگریت.
| Method | What it gives backچی دەگەڕێنێتەوە | Exampleنموونە |
|---|---|---|
upper() | A copy in capital lettersکۆپییەک بە پیتی گەورە | "ok".upper() → "OK" |
lower() | A copy in small lettersکۆپییەک بە پیتی بچووک | "OK".lower() → "ok" |
strip() | A copy without spaces at the start and the endکۆپییەک بەبێ لە سەرەتا و کۆتاییدا | " hi ".strip() → "hi" |
replace(old, new) | A copy with every old changed to newکۆپییەک کە هەموو oldـێکی تێدا کراوە بە new | "tea".replace("t", "s") → "sea" |
find(text) | The first index of text, or -1 if it is not thereیەکەم text، یان -1 ئەگەر تێیدا نەبێت | "Erbil".find("b") → 2 |
count(text) | How many times text appearstext چەند جار دەردەکەوێت | "banana".count("a") → 3 |
isdigit() | True if every character is a digitTrue ئەگەر هەموو بن | "2026".isdigit() → True |
startswith(text) | True if the string begins with text (endswith checks the end)True ئەگەر بە text دەست پێ بکات (endswith کۆتایی دەپشکنێت) | "app.py".endswith(".py") → True |
text = " Hello, Kurdistan! "
print(text.strip())
print(text.upper())
print(text.lower())
print(text.strip().replace("Hello", "Hi"))
print(text.find("Kurd"))
print(text.find("Erbil"))
print(text.count("l"))
print("2026".isdigit(), "20a6".isdigit())
print("python.py".endswith(".py"))
print(text)Hello, Kurdistan! HELLO, KURDISTAN! hello, kurdistan! Hi, Kurdistan! 9 -1 2 True False True Hello, Kurdistan!
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 5
Methods can be chained:
strip()returns a new string, andreplace()is called on that new string.دەکرێت بە زنجیر بانگ بکرێن:
strip()نوێ دەگەڕێنێتەوە وreplace()لەسەر ئەو نوێیە بانگ دەکرێت.- Lineدێڕی 6-7
"Kurd"starts at index 9 (count the two spaces)."Erbil"is not there, so the answer is-1."Kurd"لە 9ەوە دەست پێدەکات (دوو بژمێرە)."Erbil"تێدا نییە، بۆیە وەڵامەکە-1ە.- Lineدێڕی 11
The original
textstill has its spaces: no method changed it.textی ڕەسەن هێشتا هەیە: هیچ نەیگۆڕیوە.
Useful string methods: len(), find(), capitalize(), upper(), lower(), isdigit(), isalpha(), count() and replace(), each returning a new value.
بەسوودی : len()، find()، capitalize()، upper()، lower()، isdigit()، isalpha()، count() و replace()؛ هەر یەکێکیان نوێ دەگەڕێنێتەوە.
Plays 0:00-8:05, the string methods; stops before the username exercise.
لە 0:00 تا 8:05 پەخش دەبێت: ؛ پێش ڕاهێنانی ڕادەوەستێت.
String methodsمیتۆدەکانی زنجیرەنووسە
More case methods, and trimming one sideمیتۆدەکانی تری گەورە و بچووکی پیت و لابردن لە یەک لا
Besides upper() and lower(), three more methods change capital and small letters. title() gives every word a capital first letter; capitalize() gives only the first character of the whole string a capital and makes the rest small; swapcase() turns capitals into small letters and small letters into capitals. strip() also has two one-sided versions: lstrip() removes spaces only at the start (l = left) and rstrip() only at the end (r = right). Kurdish letters have no capitals, so the case methods leave them unchanged.
جگە لە upper() و lower()، سێ تر پیتی گەورە و بچووک دەگۆڕن. title() یەکەم پیتی هەموو وشەیەک گەورە دەکات؛ capitalize() تەنها یەکەم هەموو گەورە دەکات و باقییەکەی بچووک دەکات؛ swapcase() پیتە گەورەکان دەکات بە بچووک و بچووکەکان بە گەورە. strip()ـیش دوو وەشانی یەک لایەنەی هەیە: lstrip() تەنها سەرەتا لادەبات (l = left، چونکە سەرەتای لە کۆددا لای چەپە) و rstrip() تەنها هی کۆتایی (r = right). پیتە کوردییەکان گەورە و بچووکیان نییە، بۆیە گەورە و بچووککردن وەک خۆیان دەیانهێڵنەوە.
stripـی یەک لایەنەPYTHONType in a terminalلە تێرمیناڵدا بینووسەname = "hana aram"
print(name.title())
print(name.capitalize())
print("Python IS Fun".swapcase())
print("SHILAN".capitalize())
text = " tea "
print("[" + text.lstrip() + "]")
print("[" + text.rstrip() + "]")
print("[" + text.strip() + "]")
print("ئارام".upper())Hana Aram Hana aram pYTHON is fUN Shilan [tea ] [ tea] [tea] ئارام
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
Every word starts with a capital.
هەموو وشەیەک بە پیتی گەورە دەست پێدەکات.
- Lineدێڕی 3
Only the first character of the string; the rest becomes small.
تەنها یەکەم ؛ باقییەکەی بچووک دەبێت.
- Lineدێڕی 7-9
The brackets show where spaces are left.
کەوانەکان پیشان دەدەن لە کوێ ماونەتەوە.
- Lineدێڕی 10
No capitals in Kurdish: nothing changes.
لە کوردیدا پیتی گەورە نییە: هیچ ناگۆڕێت.
String methodsمیتۆدەکانی زنجیرەنووسە
Yes-or-no questions: the is…() methodsپرسیاری بەڵێ یان نا: میتۆدەکانی is…()
Methods whose names start with is change nothing: they answer a yes-or-no question about the whole string with True or False. Use them to check input before you convert it, for example if text.isdigit(): before int(text). Two traps: a space is neither a letter nor a digit, so "Room 12".isalnum() is False; and the empty string "" gives False for all of them.
هەر کە ناوەکەی بە is دەست پێ بکات هیچ ناگۆڕێت: وەڵامی پرسیارێکی بەڵێ یان نا دەربارەی هەموو بە True یان False دەداتەوە. بەکاریان بهێنە بۆ پشکنینی پێش گۆڕینی، بۆ نموونە if text.isdigit(): پێش int(text). دوو تەڵە: نە پیتە نە ، بۆیە "Room 12".isalnum() Falseە؛ هەروەها بەتاڵ "" بۆ هەموویان False دەدات.
| Method | True when…Trueە کاتێک… | Exampleنموونە |
|---|---|---|
isalpha() | every character is a letter (Kurdish letters too)هەموو پیت بن (پیتی کوردیش) | "Hawler".isalpha() → True |
isdigit() | every character is a digitهەموو بن | "2026".isdigit() → True |
isalnum() | every character is a letter or a digitهەموو پیت یان بن | "Room12".isalnum() → True |
isspace() | every character is white space (space, tab, new line)هەموو بن (، Tab، دێڕی نوێ) | " ".isspace() → True |
islower() | it has letters, and all of them are smallپیتی تێدا بێت و هەموویان بچووک بن | "erbil".islower() → True |
isupper() | it has letters, and all of them are capitalsپیتی تێدا بێت و هەموویان گەورە بن | "IT".isupper() → True |
istitle() | every word starts with a capital and goes on in small lettersهەموو وشەیەک بە پیتی گەورە دەست پێ بکات و بە بچووک بەردەوام بێت | "Hana Aram".istitle() → True |
print("Hawler".isalpha(), "Hawler City".isalpha())
print("2026".isdigit(), "20.5".isdigit())
print("Room12".isalnum(), "Room 12".isalnum())
print(" ".isspace(), "".isspace())
print("erbil".islower(), "Erbil".islower())
print("IT".isupper(), "It".isupper())
print("Hana Aram".istitle(), "Hana aram".istitle())
print("ئارام".isalpha())True False True False True False True False True False True False True False True
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1
The space makes the second answer
False.وەڵامی دووەم دەکات بە
False.- Lineدێڕی 2
The dot is not a digit.
خاڵەکە نییە.
- Lineدێڕی 4
The empty string is
Falsefor every is…() method.بەتاڵ بۆ هەموو
is…()Falseە.- Lineدێڕی 8
Kurdish letters are letters too.
پیتە کوردییەکانیش پیتن.
String methodsمیتۆدەکانی زنجیرەنووسە
find() or index()? Searching part of a stringfind() یان index()؟ گەڕان لە بەشێکی زنجیرەنووسەیەکدا
find(text) gives the first index of text, or -1 when it is missing. index(text) searches in the same way, but when text is missing it stops the program with a ValueError — use it only when the text must be there. rfind() searches from the end (r = right) and gives the last index. find(), index() and count() also accept two optional numbers, start and end: then they look only inside s[start:end], but the index they return still counts from the start of the whole string.
find(text) یەکەم text دەدات، یان -1 ئەگەر تێدا نەبێت. index(text) بە هەمان شێوە دەگەڕێت، بەڵام ئەگەر text تێدا نەبێت بە ValueError دەوەستێنێت — تەنها کاتێک بەکاری بهێنە کە دەقەکە دەبێت هەبێت. rfind() لە کۆتاییەوە دەگەڕێت (r = right) و دوایین دەدات. find()، index() و count() دوو ژمارەی ئارەزوومەندانەش وەردەگرن، start و end: ئەوکات تەنها لە ناو s[start:end]ـدا دەگەڕێن، بەڵام ئەو دەیگەڕێننەوە هەر لە سەرەتای هەموو دەژمێردرێت.
city = "Sulaimani"
print(city.find("a"))
print(city.rfind("a"))
print(city.find("a", 4))
print(city.count("a"))
print(city.count("a", 0, 4))
print(city.find("x"))
print(city.index("a"))
print(city.index("x"))3
6
6
2
1
-1
3
Traceback (most recent call last):
File "find_index.py", line 9, in <module>
print(city.index("x"))
^^^^^^^^^^^^^^^
ValueError: substring not foundPrinted by Python 3.12. Python 3.13 and newer mark the same place with ~ and ^ signs; the error message is the same.
3.12 چاپی کردووە. 3.13 و نوێتر هەمان شوێن بە نیشانەکانی ~ و ^ دیاری دەکەن؛ پەیامی هەڵەکە هەمان شتە.
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1
Indexes: S 0, u 1, l 2, a 3, i 4, m 5, a 6, n 7, i 8.
: S 0، u 1، l 2، a 3، i 4، m 5، a 6، n 7، i 8.
- Lineدێڕی 4
The search starts at index 4, so it finds the second
a.گەڕان لە 4ەوە دەست پێدەکات، بۆیە
aی دووەم دەدۆزێتەوە.- Lineدێڕی 6
Counts only in
city[0:4], which is"Sula".تەنها لە
city[0:4]ـدا دەژمێرێت، کە"Sula"ـیە.- Lineدێڕی 7-9
Missing text:
find()gives-1,index()stops with aValueError.دەقی نەبوو:
find()-1دەدات وindex()بەValueErrorدەوەستێت.
String methodsمیتۆدەکانی زنجیرەنووسە
split() and join()split() و join()
split() cuts a string into a list of smaller strings. With no argument it cuts at spaces, and a run of several spaces counts as one. With an argument it cuts at that text, for example "-". join() does the opposite: ", ".join(items) glues a list of strings together with ", " between them. (Lists are taught in Lists.) Later, split() cuts every line of a text file into words: Words, numbers and CSV tables.
split() دەکات بە لە بچووکتر. بەبێ لە دەیبڕێت و چەند لە دوای یەک وەک یەک دەژمێردرێن. بە لەو دەقەدا دەیبڕێت، بۆ نموونە "-". join() پێچەوانەکەی دەکات: ", ".join(items) لە پێکەوە دەلکێنێت و ", " دەخاتە نێوانیانەوە. ( لە لیستەکان دەخوێنرێن.) دواتر split() هەر دێڕێکی دەکات بە وشە: وشە، ژمارە و خشتەی CSV.
line = "tea coffee juice"
drinks = line.split()
print(drinks)
print(len(drinks))
date = "2026-10-22"
print(date.split("-"))
print(", ".join(drinks))
print("-".join(["2026", "10", "22"]))
print("-".join("Hello"))['tea', 'coffee', 'juice'] 3 ['2026', '10', '22'] tea, coffee, juice 2026-10-22 H-e-l-l-o
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 9
A string is a sequence of characters, so
join()puts-between its letters.بریتییە لە لە ، بۆیە
join()-دەخاتە نێوان پیتەکانییەوە.
String methodsمیتۆدەکانی زنجیرەنووسە
partition(): cut once, at the first separatorpartition(): یەکجار ببڕە، لە یەکەم جیاکەرەوەدا
split() cuts at every separator. Sometimes you want only one cut, at the first one — for example in "name: Hana Aram". partition(sep) does exactly that and always returns three pieces: the text before sep, sep itself and the text after it. If sep is missing, you get the whole string and two empty strings. The three pieces come in a tuple, a fixed group of values (see Tuples, sets and dictionaries); you read them by index, like the characters of a string.
split() لە هەموو جیاکەرەوەیەکدا دەبڕێت. هەندێک جار تەنها یەک بڕینت دەوێت، لە یەکەمیاندا — بۆ نموونە لە "name: Hana Aram"ـدا. partition(sep) ڕێک ئەوە دەکات و هەمیشە سێ پارچە دەگەڕێنێتەوە: دەقی پێش sep، خودی sep و دەقی دوای ئەو. ئەگەر sep تێدا نەبێت، هەموو و دوو بەتاڵ وەردەگریت. سێ پارچەکە لە ، کۆمەڵێک نرخی جێگیر (بڕوانە تاپڵەکان، کۆمەڵەکان و فەرهەنگەکان)؛ وەک بە دەیانخوێنیتەوە.
line = "name: Hana Aram"
parts = line.partition(":")
print(parts)
print(parts[0])
print(parts[2].strip())
print("time: 10:30".partition(":"))
print("no colon here".partition(":"))('name', ':', ' Hana Aram')
name
Hana Aram
('time', ':', ' 10:30')
('no colon here', '', '')Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2-3
Three pieces: before, the separator, after.
سێ پارچە: پێش، جیاکەرەوەکە، دوای.
- Lineدێڕی 5
strip()removes the space after the colon.strip()دوای دوو خاڵەکە لادەبات.- Lineدێڕی 6
Only the first
:cuts; the second stays in the last piece.تەنها یەکەم
:دەبڕێت؛ دووەمیان لە پارچەی کۆتاییدا دەمێنێتەوە.- Lineدێڕی 7
No
:at all: the whole string and two empty strings.هیچ
:ـێک نییە: هەموو و دوو بەتاڵ.
Comparing stringsبەراوردکردنی زنجیرەنووسەکان
The comparison operators ==, !=, <, >, <= and >= work on strings too. == is True only when both strings have exactly the same characters in the same order — a capital and a small letter are different characters.
==، !=، <، >، <= و >= لەسەر کار دەکەن. == تەنها کاتێک Trueە کە هەردوو ڕێک هەمان بە هەمان ڕیز هەبێت — پیتی گەورە و بچووک دوو جیاوازن.
< and > follow lexicographic order (dictionary order). Python compares the first characters of both strings. If they are the same, it moves to the second pair, and so on. The first pair that differs decides the answer; the rest is never looked at. If one string runs out first because it is the beginning of the other, the shorter one is smaller. The empty string "" is smaller than every other string.
< و > پەیڕەو دەکەن. یەکەم هەردوو بەراورد دەکات. ئەگەر وەک یەک بن، دەچێتە سەر جووتی دووەم و بەم شێوەیە. یەکەم جووت کە جیاواز بێت وەڵامەکە دیاری دەکات؛ ئەوانی تر هەرگیز سەیر ناکرێن. ئەگەر زووتر تەواو بێت چونکە سەرەتای ئەوی ترە، کورتەکە بچووکترە. بەتاڵ "" لە هەموو تر بچووکترە.


print("Dilan" == "Dilan")
print("Dilan" == "dilan")
print("Dilan" != "Dilshad")
print("Dilan" < "Dilshad")
print("tea" < "teacher")
print("" < "a")
print("Soran" >= "Shilan")
print("Hana" <= "Hana")True False True True True True True True
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
Danddare different characters, so the strings are not equal.Dوdدوو جیاوازن، بۆیە یەکسان نین.- Lineدێڕی 5
"tea"is the beginning of"teacher", so the shorter string is smaller."tea"سەرەتای"teacher"ە، بۆیە بچووکترە.- Lineدێڕی 7
S=S, thenois greater thanh, so"Soran"is greater.S=S، پاشانoلەhگەورەترە، بۆیە"Soran"گەورەترە.
Comparing stringsبەراوردکردنی زنجیرەنووسەکان
Why is "A" < "a" True?بۆچی "A" < "a" ڕاستە؟
A note from the course shows four surprising results: "A" < "a", "S" < "e", "S" < "eggs" and "Spam" < "eggs" are all True. Why would a capital S be smaller than a small e? Because Python does not compare letters as a person does. Every character has a number, its code point, and Python compares those numbers. ord() gives a character's number and chr() turns a number back into a character.
تێبینییەکی کۆرسەکە چوار ئەنجامی سەرسوڕهێنەر پیشان دەدات: "A" < "a"، "S" < "e"، "S" < "eggs" و "Spam" < "eggs" هەموویان Trueن. بۆچی S-ی گەورە لە e-ی بچووک بچووکترە؟ چونکە پیتەکان وەک مرۆڤ بەراورد ناکات. هەر ژمارەیەکی هەیە کە پێی دەوترێت و ئەو ژمارانە بەراورد دەکات. ord() ژمارەی دەدات و chr() ژمارەیەک دەکاتەوە بە .
print("A" < "a")
print("S" < "e")
print("S" < "eggs")
print("Spam" < "eggs")
print(ord("A"), ord("a"))
print(ord("S"), ord("e"))True True True True 65 97 83 101
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 4
Only the first pair is compared:
S(83) <e(101). The rest of both words is never looked at.تەنها یەکەم جووت بەراورد دەکرێت:
S(83) <e(101). باقیی هەردوو وشەکە هەرگیز سەیر ناکرێت.
| Characters | Code points |
|---|---|
A … Z | 65 … 90 |
a … z | 97 … 122 |
0 … 9 | 48 … 57 |
| space | 32 |
ئ ا ب | 1574 1575 1576 |
Comparing stringsبەراوردکردنی زنجیرەنووسەکان
Kurdish letters in comparisonsپیتە کوردییەکان لە بەراورددا
Kurdish letters have large code points (from about 1570 up), so any word that starts with a Kurdish letter is "greater" than any English word: "ئارام" > "Zana" is True. There is a second surprise: the code points of Kurdish letters do not follow the order of the Kurdish alphabet. پ comes before ت in the alphabet, but its number is larger (), so Python puts "پیاو" after "تەنها".
پیتە کوردییەکان گەورەیان هەیە (نزیکەی لە 1570 بەرەو سەر)، بۆیە هەر وشەیەک کە بە پیتێکی کوردی دەست پێ بکات لە هەموو وشەیەکی ئینگلیزی «گەورەترە»: "ئارام" > "Zana" Trueە. سەرسوڕمانێکی دووەمیش هەیە: پیتە کوردییەکان ڕیزبەندیی ئەلفوبێی کوردی پەیڕەو ناکەن. پ لە ئەلفوبێدا پێش ت دێت، بەڵام ژمارەکەی گەورەترە (1662 لە 1578 گەورەترە)، بۆیە "پیاو" دەخاتە دوای "تەنها".
print(ord("ئ"), ord("ا"), ord("ب"))
print("ئارام" > "Zana")
print(ord("پ"), ord("ت"))
print("پیاو" < "تەنها")1574 1575 1576 True 1662 1578 False
Comparing stringsبەراوردکردنی زنجیرەنووسەکان
Comparing without caring about capitalsبەراوردکردن بەبێ گرنگیدان بە پیتی گەورە
Because of code points, "apple" < "Banana" is False: B (66) is smaller than a (97). To compare the way a person reads, change both strings to the same case first, usually with .lower(). The same trick checks a user's answer: answer.strip().lower() == "yes" accepts "YES", "Yes " and "yes". casefold() is a stronger lower() for some languages (German ß becomes ss).
بەهۆی "apple" < "Banana" Falseە: B (66) لە a (97) بچووکترە. بۆ ئەوەی وەک مرۆڤێک بەراورد بکەیت، سەرەتا هەردوو بکە بە یەک جۆری پیت، زۆربەی جار بە .lower(). هەمان فێڵ وەڵامی دەپشکنێت: answer.strip().lower() == "yes" "YES"، "Yes " و "yes" قبووڵ دەکات. casefold() lower()ـێکی بەهێزترە بۆ هەندێک زمان (ßی ئەڵمانی دەبێت بە ss).
print("apple" < "Banana")
print("apple".lower() < "Banana".lower())
answer = "YES"
print(answer == "yes")
print(answer.lower() == "yes")
print("Straße".casefold() == "STRASSE".casefold())False True False True True
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What happensچی ڕوودەدات | Fixچارەسەر |
|---|---|---|
word[len(word)] | IndexError: the last index is one less than the lengthIndexError: دوایین یەکێک لە درێژییەکە کەمترە | word[len(word) - 1] / word[-1] |
word[0] = "J" | TypeError: strings are immutableTypeError: | word = "J" + word[1:] |
name.upper() | Nothing visible: the new string is thrown awayهیچ شتێکی بینراو: فڕێ دەدرێت | name = name.upper() |
"Age: " + 19 | TypeError: + cannot join a string and a numberTypeError: + ناتوانێت و ژمارەیەک بلکێنێت | "Age: " + str(19) |
"YES" == "yes" | False: comparisons are case-sensitiveFalse: بەراوردەکان | answer.lower() == "yes" |
"10" < "9" | True: digits in text are compared as characters, 1 before 9True: ژمارەکانی ناو دەق وەک بەراورد دەکرێن، 1 پێش 9 | int("10") < int("9") |
print(“Hi”) | SyntaxError: curly quotes from a word processor are not Python quotesSyntaxError: چەماوەی پرۆگرامی نووسین نین | print("Hi") |
print("10" < "9")
print(10 < 9)
print(int("10") < int("9"))True False False
Curly quotes are shown with a full example in The for loop and range().
چەماوە بە نموونەیەکی تەواو لە خولی for و range() پیشان دراون.
Exercisesڕاهێنانەکان
Ask for a full name (first and last name) and print the initials in capitals, like S.A. for shilan aram.
داوای ناوی تەواو بکە (ناوی یەکەم و دووەم) و پیتە سەرەتاییەکان بە پیتی گەورە چاپ بکە، وەک S.A. بۆ shilan aram.
Hintئاماژە
split() gives the two names; [0] gives the first letter of each.
split() دوو ناوەکە دەدات؛ [0] یەکەم پیتی هەر یەکێکیان دەدات.
Show answerوەڵامەکە پیشان بدە
full_name = input("Your full name: ")
parts = full_name.split()
initials = parts[0][0] + "." + parts[1][0] + "."
print("Initials:", initials.upper())Your full name: shilan aram Initials: S.A.
A word like level reads the same backwards. Ask for a word and print True if it does, False if not. Capital letters should not matter (Level counts).
وشەیەکی وەک level لە پێچەوانەشەوە هەمان شت دەخوێنرێتەوە. داوای وشەیەک بکە و ئەگەر وا بوو True چاپ بکە، ئەگەر نا False. پیتی گەورە نابێت گرنگ بێت (Levelیش حساب دەکرێت).
Hintئاماژە
word[::-1] is the reversed word.
word[::-1] هەمان وشەیە بە پێچەوانەوە.
Show answerوەڵامەکە پیشان بدە
word = input("A word: ").strip().lower()
print(word == word[::-1])A word: Level True
word = input("A word: ").strip().lower()
print(word == word[::-1])A word: Kurdistan False
Without running it, write True or False for each line. Then run it and explain every answer.
بەبێ جێبەجێکردن، بۆ هەر دێڕێک True یان False بنووسە. پاشان جێبەجێی بکە و هەموو وەڵامێک ڕوون بکەرەوە.
print("Rezan" == "rezan")
print("cat" < "car")
print("book" < "bookshop")
print("Z" < "a")
print("Hana" > "Hanar")
print("99" < "100")Show answerوەڵامەکە پیشان بدە
print("Rezan" == "rezan")
print("cat" < "car")
print("book" < "bookshop")
print("Z" < "a")
print("Hana" > "Hanar")
print("99" < "100")False False True True False False
Randrare different characters.c,aare the same; thent(116) is greater thanr(114)."book"is the beginning of"bookshop", so it is smaller.Zis 90 andais 97."Hana"is the beginning of"Hanar", so it is smaller, not greater.- Text, not numbers:
9is greater than1, so"99"is greater.
Rوrدوو جیاوازن.cوaوەک یەکن؛ پاشانt(116) لەr(114) گەورەترە."book"سەرەتای"bookshop"ە، بۆیە بچووکترە.Z90ە وa97."Hana"سەرەتای"Hanar"ە، بۆیە بچووکترە نەک گەورەتر.- دەقە نەک ژمارە:
9لە1گەورەترە، بۆیە"99"گەورەترە.
file_name = "report.final.py". Print the part before the first dot, whether the name ends with .py, and how many dots it has.
file_name = "report.final.py". ئەو بەشەی پێش یەکەم خاڵ چاپ بکە، ئایا ناوەکە بە .py کۆتایی دێت و چەند خاڵی تێدایە.
Show answerوەڵامەکە پیشان بدە
file_name = "report.final.py"
dot = file_name.find(".")
print(file_name[:dot])
print(file_name.endswith(".py"))
print(file_name.count("."))report True 2
Without running it, write down what each line prints. Then run it and check. Careful with the last line.
بەبێ جێبەجێکردن، بنووسە هەر دێڕێک چی چاپ دەکات. پاشان جێبەجێی بکە و بیپشکنە. ئاگاداری دوایین دێڕ بە.
s = "Kurdistan Region"
print(s[-6:-1])
print(s[::2])
print(s[-1])
print(2 * s[:4])
print(s[::-2])
print(s[:3] + s[3:] == s)
print(s.swapcase())
print(s.startswith("Kurd"))
print(s.isalpha())Show answerوەڵامەکە پیشان بدە
s = "Kurdistan Region"
print(s[-6:-1])
print(s[::2])
print(s[-1])
print(2 * s[:4])
print(s[::-2])
print(s[:3] + s[3:] == s)
print(s.swapcase())
print(s.startswith("Kurd"))
print(s.isalpha())Regio KritnRgo n KurdKurd nie asdu True kURDISTAN rEGION True False
s[-6:-1]: index-6isR, and-1(the lastn) is the stop, so it is left out.s[::2]: every second character from index 0 — the space at index 9 is skipped.2 * s[:4]repeats"Kurd"twice.s[::-2]walks backwards from the last character and takes every second one.s[:i] + s[i:]is always the whole string, so the comparison isTrue.isalpha()isFalsebecause of the space: a space is not a letter.
s[-6:-1]:-6یەکسانە بەRو-1(دوایینn) کۆتاییە، بۆیە تێدا نییە.s[::2]: لە 0ەوە وەردەگرێت و یەکێک جێدەهێڵێت — 9 جێدەهێڵرێت.2 * s[:4]"Kurd"دوو جار دووبارە دەکاتەوە.s[::-2]لە دوایین بەرەو دواوە دەڕوات و وەردەگرێت و یەکێک جێدەهێڵێت.s[:i] + s[i:]هەمیشە هەموو ، بۆیە بەراوردەکەTrueە.isalpha()بەهۆیFalseە: پیت نییە.
Predict each line, then run the program. Why does it stop at the last line, and which method would give -1 instead?
هەر دێڕێک پێشبینی بکە، پاشان جێبەجێ بکە. بۆچی لە دوایین دێڕدا دەوەستێت و کام لەبری ئەوە -1 دەدات؟
address = "Street 60, Erbil, Erbil Governorate"
print(address.upper())
print(address.count("Erbil"))
print(address.find("Erbil"), address.rfind("Erbil"))
print(address.split(","))
print(address.partition(","))
print(address.replace("Street", "St."))
print(address.index("Duhok"))Show answerوەڵامەکە پیشان بدە
address = "Street 60, Erbil, Erbil Governorate"
print(address.upper())
print(address.count("Erbil"))
print(address.find("Erbil"), address.rfind("Erbil"))
print(address.split(","))
print(address.partition(","))
print(address.replace("Street", "St."))
print(address.index("Duhok"))STREET 60, ERBIL, ERBIL GOVERNORATE
2
11 18
['Street 60', ' Erbil', ' Erbil Governorate']
('Street 60', ',', ' Erbil, Erbil Governorate')
St. 60, Erbil, Erbil Governorate
Traceback (most recent call last):
File "address.py", line 8, in <module>
print(address.index("Duhok"))
^^^^^^^^^^^^^^^^^^^^^^
ValueError: substring not foundPrinted by Python 3.12. Python 3.13 and newer mark the same place with ~ and ^ signs; the error message is the same.
3.12 چاپی کردووە. 3.13 و نوێتر هەمان شوێن بە نیشانەکانی ~ و ^ دیاری دەکەن؛ پەیامی هەڵەکە هەمان شتە.
find()gives the first"Erbil"(index 11),rfind()the last one (index 18).split(",")keeps the space after each comma;strip()each piece if you do not want it.partition(",")cuts only at the first comma."Duhok"is not in the string, soindex()stops the program with aValueError.address.find("Duhok")would give-1and the program would go on.
find()یەکەم"Erbil"دەدات ( 11) وrfind()دوایینیان ( 18).split(",")دوای هەر کۆمایەک دەهێڵێتەوە؛ ئەگەر نەتەوێت،strip()لەسەر هەر پارچەیەک بەکار بهێنە.partition(",")تەنها لە یەکەم کۆمادا دەبڕێت."Duhok"لە نییە، بۆیەindex()بەValueErrorدەوەستێنێت.address.find("Duhok")-1دەدات و بەردەوام دەبێت.
A date is typed as 2026-10-24. Remove every - and print the result and its length. Then turn every space in "Hana Aram Karim" into -.
بەروارێک بەم شێوەیە نووسراوە: 2026-10-24. هەموو -ـێک لاببە و ئەنجامەکە و درێژییەکەی چاپ بکە. پاشان هەموو ناو "Hana Aram Karim" بکە بە -.
Hintئاماژە
replace(old, "") replaces with nothing — that deletes.
replace(old, "") بە هیچ دەیگۆڕێت — واتە دەیسڕێتەوە.
Show answerوەڵامەکە پیشان بدە
date = "2026-10-24"
digits = date.replace("-", "")
print(digits, len(digits))
full_name = "Hana Aram Karim"
print(full_name.replace(" ", "-"))
print(date)20261024 8 Hana-Aram-Karim 2026-10-24
Each replace() returns a new string; the old one is unchanged, as the last line shows (strings are immutable).
هەر replace()ـێک نوێ دەگەڕێنێتەوە؛ کۆنەکە ناگۆڕێت، وەک دوایین دێڕ پیشانی دەدات ( ).
In your own words, explain why "Spam" < "eggs" is True although s comes after e in the alphabet.
بە وشەی خۆت ڕوونی بکەرەوە بۆچی "Spam" < "eggs" Trueە، هەرچەندە s لە ئەلفوبێدا لە دوای e دێت.
Show answerوەڵامەکە پیشان بدە
Python compares the first characters, S and e, by their code points: ord("S") is 83 and ord("e") is 101. , so the answer is True at once and the other letters are never compared. Capital letters (65–90) all come before small letters (97–122). With "Spam".lower() < "eggs".lower() the answer would be False.
یەکەم هەردوو وشەکە، S و e، بە بەراورد دەکات: ord("S") 83ە و ord("e") 101. 83 لە 101 کەمترە، بۆیە وەڵامەکە دەستبەجێ Trueە و پیتەکانی تر هەرگیز بەراورد ناکرێن. هەموو پیتە گەورەکان (65–90) پێش پیتە بچووکەکان (97–122) دێن. بە "Spam".lower() < "eggs".lower() وەڵامەکە False دەبوو.
More string exercises need a loop: hiding the vowels of a text, counting its letters, digits and spaces, and adding up the digits in it. They come after the loop lessons, in More exercises: text and number series.
هەندێک ڕاهێنانی تری پێویستیان بە هەیە: شاردنەوەی پیتە بزوێنەکانی دەقێک، ژماردنی پیت، و و کۆکردنەوەی ناوی. ئەوانە دوای وانەکانی دێن، لە ڕاهێنانی زیاتر: دەق و زنجیرەی ژمارە.
Summaryپوختە
- A string is text: a sequence of characters between quotes.
len()counts them. - Indexes start at 0; the last is
len(s) - 1or-1. A wrong index givesIndexError. s[start:stop]takes a slice;stopis not included.s[::-1]reverses.- Strings are immutable: build a new string and store it.
+joins,*repeats,insearches; methods likeupper(),strip(),split()return new values.- More methods:
title(),capitalize(),swapcase(),lstrip()/rstrip(); theis…()methods answerTrueorFalse;find()gives-1butindex()raisesValueError;partition()cuts once. - Strings compare letter by letter by code point (
ord()): capitals before small letters, Kurdish letters after English ones. Uselower()to ignore case. - To visit every character one by one, use a loop: see The for loop and range().
- دەقە: لە لە نێوان .
len()دەیانژمێرێت. - لە 0ەوە دەست پێدەکەن؛ دوایینیان
len(s) - 1یان-1ە. هەڵەIndexErrorدەدات. s[start:stop]دەکات؛stopتێدا نییە.s[::-1]هەڵیدەگەڕێنێتەوە.- : نوێ دروست بکە و هەڵیبگرە.
+دەلکێنێت،*دووبارە دەکاتەوە،inدەگەڕێت؛ وەکupper()،strip()وsplit()نرخی نوێ دەگەڕێننەوە.- زیاتر:
title()،capitalize()،swapcase()وlstrip()/rstrip()؛is…()وەڵامیTrueیانFalseدەدەنەوە؛find()-1دەدات بەڵامindex()ValueErrorدروست دەکات؛partition()یەکجار دەبڕێت. - پیت بە پیت بەپێی (
ord()) بەراورد دەکرێن: گەورەکان پێش بچووکەکان و پیتە کوردییەکان دوای ئینگلیزییەکان. بۆ پشتگوێخستنی گەورە و بچووکیlower()بەکار بهێنە. - بۆ سەردانکردنی هەموو یەک لە دوای یەک، بەکار بهێنە: بڕوانە خولی for و
range().
What is the index of the last character of a string s?ئیندێکسی دوایین نووسەی زنجیرەنووسەی s چییە؟
len(s) - 1, or simply -1.
len(s) - 1، یان بە سادەیی -1.
What does "Hello"[1:3] give?"Hello"[1:3] چی دەدات؟
"el" — indexes 1 and 2; index 3 is the stop.
"el" — 1 و 2؛ 3 کۆتاییە.
Why does s[0] = "X" fail?بۆچی s[0] = "X" سەرناکەوێت؟
Strings are immutable. Make a new string: s = "X" + s[1:].
. نوێ دروست بکە: s = "X" + s[1:].
Why is "B" < "a" True?بۆچی "B" < "a" ڕاستە؟
Python compares code points: ord("B") is 66 and ord("a") is 97.
بەراورد دەکات: ord("B") 66ە و ord("a") 97.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
Strings from the start: quotes, len(), indexes from 0, slicing, useful methods like lower(), count(), find() and replace(), and joining strings.
لە سەرەتاوە: ، len()، لە سفرەوە، ، بەسوود وەک lower()، count()، find() و replace() و .
Plays 0:00-15:01 (quotes, indexing, slicing, methods, replace, concatenation); stops before string formatting.
لە 0:00 تا 15:01 پەخش دەبێت (، ، ، ، replace و )؛ پێش فۆرماتکردنی ڕادەوەستێت.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
The while Loopخولی while
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.