Lists get sublist
This section is available only in EnglishBlock returns sublist (slice) of list variable.
First argument is variable containing list, second and third argument should be either Int or None. Default arguments are None and means skipped slicing option (i.e. setting pulldown to “first” or “last”).
In case slicing can’t be performed because slicing index is for example string then None is returned.
XML representation of lists_get_sublist block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="lists_get_sublist">
<mutation at1="true" at2="true"/>
<field name="WHERE1">FROM_START</field>
<field name="WHERE2">FROM_END</field>
<value name="VALUE">
<block type="variables_get">
<field name="VAR">list</field>
</block>
</value>
<value name="AT1">
<block type="math_number">
<field name="NUM">0</field>
</block>
</value>
<value name="AT2">
<block type="math_number">
<field name="NUM">0</field>
</block>
</value>
</block>
<block type="lists_get_sublist">
<mutation at1="false" at2="false"/>
<field name="WHERE1">FIRST</field>
<field name="WHERE2">LAST</field>
<value name="VALUE">
<block type="variables_get">
<field name="VAR">list</field>
</block>
</value>
</block>
</xml>