# Split string in Python

**URL:** <https://forum.inductiveautomation.com/t/split-string-in-python/20714>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [November 9, 2018, 2:43pm UTC](https://forum.inductiveautomation.com/t/split-string-in-python/20714 "2018-11-09T14:43:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [November 9, 2018, 2:43pm UTC](https://forum.inductiveautomation.com/t/split-string-in-python/20714/1 "2018-11-09T14:43:14Z")

</div>

I have a code -

```auto
testTemperature = (value.split('A')[1])[0:5]

```

Where the value =  
`SS1L,A121.0,`

and the result is =

```auto
121.0

```

The question is how ?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [November 9, 2018, 2:49pm UTC](https://forum.inductiveautomation.com/t/split-string-in-python/20714/2 "2018-11-09T14:49:59Z")

</div>

What is your question?  
You are splitting it at A  
Returning the second part of the split [1] which is 121.0,  
Then you are asking for the first 5 characters [0:5] which results in 121.0

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [November 9, 2018, 3:00pm UTC](https://forum.inductiveautomation.com/t/split-string-in-python/20714/3 "2018-11-09T15:00:42Z")

</div>

Perfect. Thank you. I was just trying to figure out what is going on cause so many things were happening together.
