-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(curriculum/ python): italicize definition case convertor project #55180
fix(curriculum/ python): italicize definition case convertor project #55180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the syntax in the paragraph definition
...on/learn-list-comprehension-by-building-a-case-converter-program/657e928716b77b2277980276.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that maybe we could think of moving the definition to the step in which list comprehensions are actually used. This is step 19 (#54051)
Lines 10 to 16 in 8a4c8a0
A list comprehension is a concise way to create lists in Python. A basic list comprehension consists of an expression followed by a `for` clause: | |
```py | |
spam = [i * 2 for i in iterable] | |
``` | |
The above uses the variable `i` to iterate over `iterable`. Each elements of the resulting list is obtained by evaluating the expression `i * 2` at the current iteration. |
I'm not sure if that would better better.
I was thinking the same. I was thinking the same. |
Also, step 18 and 19 have tracebacks in the console that weren't addressed. |
After Lary's PR will be merged there won't be any. |
Step 19 from the new changes would be a good place to introduce list comprehensions. |
I hit 'edit' instead of 'quote reply' on one of your previous comment 😅 sorry about the confusion @zairahira |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. I would argue that list comprehensions don't improve readability 😜
...on/learn-list-comprehension-by-building-a-case-converter-program/657e928716b77b2277980276.md
Outdated
Show resolved
Hide resolved
...on/learn-list-comprehension-by-building-a-case-converter-program/657f425dbab54e11993c80f0.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Do we need to add any other definition for this project?
Checklist:
main
branch of freeCodeCamp.Related to #55111