Jump to content

Recommended Posts

Posted

Hi everyone,

I have been using Python for a year and now trying to get the hang of list comprehensions. I understand the basics,, but I am stuck on how to use them effectively. For example, how do I create a list of squares from 1 to 10 using a list comprehension: ??

Also, are there any best practices or common pitfalls I should be aware of: ??

Thanks in advance for your help......🙂

Marcos Andrew

 

msbi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...