Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9707

C# 使いの Python メモ

$
0
0
FirstOrDefault C#であればそれを返しなければ null にしたい LINQ の関数と言えば FirstOrDefault employees.FirstOrDefault(p => p.name == "Tanaka) Python でやるにはイテレータの next 関数が、次のよう殺がなければデフォルト値を返すように出来るため次のように出来るそうな。 tanaka = next((e for e in employees if e.name == "Tanaka"), None) 参考:loekvandenouweland.com/content/first-or-default-in-python.html

Viewing all articles
Browse latest Browse all 9707

Trending Articles