f-string
Established Kurdish termزاراوەی کوردیی جێگیر Definitionپێناسە
A Python with the letter f before the quotes. Expressions inside { } are replaced by their values, and a after a colon controls how they look: f"{price:.2f}".
Pythonـە کە پیتی f پێش دەنووسرێت. ناو { } بە نرخەکانیان دەگۆڕدرێن و دوای دوو خاڵ شێوەیان دیاری دەکات: f"{price:.2f}".
Exampleنموونە
The values of name and price are put into the text, and .2f keeps two digits after the point.
نرخەکانی name و price دەخرێنە ناو دەقەکەوە و .2f دوو دوای خاڵەکە دەهێڵێتەوە.
name = "Aram"
price = 3.14159
print(f"{name} paid {price:.2f} dinars") # Aram paid 3.14 dinarsOther Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
ئێف-سترینگ
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
A Python syntax name kept as it is, like the registry's heredoc; Python's documentation calls it a 'formatted string literal'. It is Python's form of string interpolation (تێخستنی گۆڕاو).
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- Input and Outputنێوخستە و دەرخستە
- Project: Binary to Decimal Converterپڕۆژیلە: گۆڕینی دووانی بۆ دەیی
- Operators and Expressionsکارپێکەرەکان و دەربڕینەکان
- Nested Loops and Patternsخولە ناوەکییەکان و کێشانی شێوە
- Return Values and Noneنرخە گەڕاوەکان و None
- Python Next to JavaPython لە تەنیشت Javaـەوە
- Working with Stringsکارکردن لەگەڵ زنجیرەنووسەکان
- The for Loop and range()خولی for و
range()