How do I split an input String into seperate usable integers in python
<p>I'm trying to split a Input String xyz into 3 tokens and then seperating into 3 integers called x, y, and z.
I want it to do this so that I have to do less input and then be able to use them for the coordinates of <code>mc.setblocks(x1, y1, z1, x, y, z, BlockId)</code>.     How do I Separate it so that it turns out as 3 different ints and\or split them into tokens to do so? I know how I would do this in java but I have no clue of how to do it in python. It should look something like this :</p>

<pre><code>xyz1 = input("enter first coordinates example: 102 36 74")
st = StringTokenizer(xyz1)
x = st.nextToken
y = st.nextToken
z = st.nextToken
</code></pre>

<p>You can take the string that is in <code>xyz1</code> and split it and turn them into integers like this</p>

<pre><code>xyz_list = [int(x) for x in xyz1.split(' ')]
</code></pre>

<p>If you don't want these integers in a list and would prefer to store them into separate variables, just do this</p>

<pre><code>x = xyz_list[0]
y = xyz_list[1]
z = xyz_list[2]
</code></pre>

python split coordinates tokenize minecraft