linq

Python's list comprehension vs .NET LINQ

Python's list comprehension vs .NET LINQ Question: The following simple LINQ code string[] words = { “hello”, “wonderful”, “linq”, “beautiful”, “world” }; // Get only short words var shortWords = from word in words where word.Length <= 5 select word; // Print each word out shortWords.Dump(); can be translated into python using list comprehension as …

Total answers: 4