lillee205 / slicer

Simple site to help students understand Python slicing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slicer

Simple site to help students understand Python slicing

About

Link to slicer site

Python slicing can be a bit difficult to grasp at first. This tool hopes to help beginner coders understand visually what it means to slice a string.

There are two modes:

Select indexes to slice

Here, you type either a string or an array into the input box. What you typed shows up on the screen, and you can then click on each element of the string/array which highlights the element at the index in blue. Once you're done highlighting, you can click submit to see how to write Python to only get the blue highlighted elements.

Write Python to slice

You also type a string or array into the input box which shows up on the screen. Then, you have an additional input box where you can write Python code in the form of item[some splicing here] (as of now, you must append it with the name "item"). Then, what you typed will be shown visually with blue highlights on the screen.

About

Simple site to help students understand Python slicing


Languages

Language:HTML 56.7%Language:Python 29.9%Language:CSS 13.4%