セクション 3. 章 4
single
Challenge: Refactor to Pythonic Style
メニューを表示するにはスワイプしてください
In this challenge, you will refactor a piece of code to use more Pythonic constructs. Your goal is to rewrite the provided code to make use of list comprehensions and built-in functions, replacing manual loops and unnecessary temporary variables. This exercise will help you practice writing code that is concise, readable, and takes full advantage of Python's strengths.
タスク
スワイプしてコーディングを開始
Refactor the function get_even_squares to use Pythonic idioms.
- Replace the explicit loop and manual list appending with a list comprehension.
- Use only built-in functions and constructs.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 4
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください