1. Glossaryفەرهەنگی زاراوەکان
Negative index
ئیندێکسی سالب
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

In Python, an index below 0 that counts from the end of a list: -1 is the last item and -2 the one before it. It can hide mistakes when a user types a negative number.

لە ، کە لە 0 بچووکترە و لە کۆتایی لیستەوە دەژمێرێت: ⁦-1⁩ دوایین دانەیە و ⁦-2⁩ ئەوەی پێش ئەو. کاتێک بەکارهێنەر ژمارەیەکی سالب دەنووسێت دەکرێت هەڵە بشارێتەوە.

Exampleنموونە

That is why the game must check 0 <= row < 3 before it uses the numbers a player types.

لەبەر ئەوە یارییەکە دەبێت پێش بەکارهێنانی ئەو ژمارانەی یاریزان دەیاننووسێت 0 <= row < 3 بپشکنێت.

board = [['x', 'o', 'x'],
         ['o', 'x', 'o'],
         [' ', ' ', 'o']]
print(board[-1][-1])  # o  (the bottom-right cell)

Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر

ئیندێکسە سالبەکە، ئیندێکسە سالبەکان، ئیندێکسێکی سالب، ئیندێکسی سالبی، ئیندێکسە سالبەکانی، ئیندێکسێکی سالبی

Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە

سالب (negative) is the owner's word in his alpha-beta article; the registry's index = ئیندێکس. Proposed.

Related termsزاراوە پەیوەندیدارەکان

Videosڤیدیۆکان

Python Tutorial for Beginners 4: Lists, Tuples, and SetsCorey Schafer · Englishئینگلیزی · 1.8M viewsبینین · 43K likesلایک · Partبەشی 2:31–3:30 (ofلە 29:04)
String indexing in Python is easy ✂️Bro Code · Englishئینگلیزی · 154K viewsبینین · 3.4K likesلایک · Partبەشی 0:00–5:17 (ofلە 7:27)
Python Lists: Indexing & SlicingReal Python · Englishئینگلیزی · 94K viewsبینین · 1.6K likesلایک · Partبەشی 1:29–2:14 (ofلە 6:56)

Learn more inزیاتر فێربە لە