---
title: "Discussion on \"The Pythonic way of implementation: List Comprehensions\" | Hashnode"
description: "Discussion on \"The Pythonic way of implementation: List Comprehensions\". If I tell you to square all the number in the given list in python. How will you code it? If you're a beginner in python, you'll probably do the following.\nList = [5, 8, 3, 9, 11]\n\nfor i in range(len(List)):\n    List[i] = List[i] ** 2\n\nprint(\"List af..."
url: "https://hashnode.com/posts/the-pythonic-way-of-implementation-list-comprehensions/68025f34d882217420912492"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The Pythonic way of implementation: List Comprehensions](https://coderafk.hashnode.dev/the-pythonic-way-of-implementation-list-comprehensions?utm_source=hashnode&utm_medium=feed)

If I tell you to square all the number in the given list in python. How will you code it? If you're a beginner in python, you'll probably do the following. List = \[5, 8, 3, 9, 11\] for i in range(len(List)): List\[i\] = List\[i\] \*\* 2 print("List af...

May 23, 2024 · 4 min read · coderafk.hashnode.dev  
Read the article

-   [#python3](https://hashnode.com/tag/python3)
-   [#python](https://hashnode.com/tag/python)
-   [#list](https://hashnode.com/tag/list)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#pythonic](https://hashnode.com/tag/pythonic)

## Written by

[Aqsa Shoeb](https://hashnode.com/@Aqsaafk)

@Aqsaafk

  
[View profile](https://hashnode.com/@Aqsaafk)

Solve.Create.Sleep

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
