# List splicing to show elements separately

**URL:** <https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966>\
**Category:** Python Help\
**Created:** [June 29, 2024, 4:27pm UTC](https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966 "2024-06-29T16:27:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cogiz](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cogiz](https://discuss.python.org/u/cogiz)\
**Post date:** [June 29, 2024, 4:27pm UTC](https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966/1 "2024-06-29T16:27:59Z")

</div>

I have a list that I want to slice and print each element separately:

````python
HEARTS = chr(9829)
SPADES = chr(9824)
DIAMONDS = chr(9830)```
CLUBS = chr(9827)
card = [('4', '♣')]

````

I want to print each element separately as follows:

```python
print("current rank is {}".format(card[0])
print("current suit is {}".format(card[1])

```

I would like to be able to refer to each element singularly as needed but  
I’m confused on how to do this correctly.  
Any assistance is greatly appreciated,  
thank you.  
Cogiz

---

<div class="post-metadata">

**Author:** ![TomRitchford](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/tomritchford/32/6123_2.png) [@TomRitchford](https://discuss.python.org/u/TomRitchford)\
**Post date:** [June 29, 2024, 4:42pm UTC](https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966/2 "2024-06-29T16:42:46Z")

</div>

It’s a little unclear what you want: perhaps f-strings will provide the answer?

`print(f"current card is the {card[0]} of {card[1]}")`

Result:

`current card is the 4 of ♣`

---

<div class="post-metadata">

**Author:** ![cogiz](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@cogiz](https://discuss.python.org/u/cogiz)\
**Post date:** [June 29, 2024, 5:20pm UTC](https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966/3 "2024-06-29T17:20:31Z")

</div>

that was the answer I was looking for.  
Thank you very much.

cogiz

---

<div class="post-metadata">

**Author:** ![kknechtel](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kknechtel](https://discuss.python.org/u/kknechtel)\
**Post date:** [June 29, 2024, 5:20pm UTC](https://discuss.python.org/t/list-splicing-to-show-elements-separately/56966/4 "2024-06-29T17:20:37Z")

</div>

> [@cogiz](#):
>
> I would like to be able to refer to each element singularly as needed but  
> I’m confused on how to do this correctly.

I don’t understand why you are confused, or why you believe there is a problem.

What happened when you tried just writing the code the way you “want to”?

How is that different from what you want to happen?
