# What about adding Python syntax a\[2:4\]?

**URL:** https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136
**Category:** 💡 Ideas
**Created:** [September 12, 2024, 8:43am UTC](https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136 "2024-09-12T08:43:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)
#### Post date: [September 12, 2024, 8:43am UTC](https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136/1 "2024-09-12T08:43:41Z")

</div>

```javascript
array[2:4]
array[2:]
string[2:4]
string[:4]

```

Other languages use `..` or `...` instead of `:`.

It also can:

```javascript
array = [1, 2, 3, 4, 5, 6, 7, 8, 9]
array[2:8] = [100] // [1, 2, 100, 9]
array = [1, 2, 3, 4, 5]
array[2:4] = [100, 101, 102, 103, 104] // [1, 2, 100, 101, 102, 103, 104, 5]
```

---

<div class="post-metadata">

### Author: ![bergus](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/bergus/32/152_2.png) [@bergus](https://es.discourse.group/u/bergus)
#### Post date: [September 12, 2024, 11:45am UTC](https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136/2 "2024-09-12T11:45:55Z")

</div>

> **[GitHub - tc39/proposal-slice-notation](https://github.com/tc39/proposal-slice-notation)**
>
> Contribute to tc39/proposal-slice-notation development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)
#### Post date: [September 12, 2024, 3:21pm UTC](https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136/3 "2024-09-12T15:21:47Z")

</div>

Thanks. 4 years and still stage 1. Interesting why.

---

<div class="post-metadata">

### Author: ![oleedd](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/oleedd/32/2148_2.png) [@oleedd](https://es.discourse.group/u/oleedd)
#### Post date: [September 13, 2024, 10:50am UTC](https://es.discourse.group/t/what-about-adding-python-syntax-a-2-4/2136/4 "2024-09-13T10:50:54Z")

</div>

I think it has to come with assignment to be complete. Otherwise it will remain unfinished like `?.` (still no assignment).
