Repetition operator
کارپێکەری دووبارەکردنەوە
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە Definitionپێناسە
The * operator used with a or a and a whole number: it joins that many copies end to end. "ab" * 3 is "ababab" and [0] * 4 is [0, 0, 0, 0].
کارپێکەری * کاتێک لەگەڵ یان و بەکار دێت: ئەو ژمارەیە کۆپی لە دوای یەک بەیەکەوە دەلکێنێت. "ab" * 3 دەکاتە "ababab" و [0] * 4 دەکاتە [0, 0, 0, 0].
Exampleنموونە
Careful: repeating a list that contains a list copies only the reference, so all rows are the same inner list.
ئاگاداربە: دووبارەکردنەوەی کە لیستێکی تێدایە تەنها کۆپی دەکات، بۆیە هەموو ڕیزەکان هەمان لیستی ناوەوەن.
print("ab" * 3) # ababab
grid = [[0] * 3] * 2
grid[0][0] = 5
print(grid) # [[5, 0, 0], [5, 0, 0]]Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
کارپێکەرەکەی دووبارەکردنەوە، کارپێکەرێکی دووبارەکردنەوە
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
Built on the registry's operator (کارپێکەر) + دووبارەکردنەوە (repeating). The lecturer's slides call it the replication operator. Proposed.