Quick actions

cmd+k|ctrl+k

Navigation

Languages

List

Snippet info

Language

Python

Visibility

public

Author

shigeotoga

Created

2026-08-05T09:31:38.465457Z

Updated

2026-08-05T09:57:09.056202Z

staff = ["Cider", "Apple", "Beetle", "Hi", "Hello", "Pizza"]
print(staff)
print(staff[0:3:1], end="\n\n") # From 0-3, exclusive of 3

staff[0] = "Cider Tower"
staff[1] = "Apple Juice"
print(staff, end="\n\n")

copy = staff[0:3:2] # Copy from 0-3 with 2 step
print(copy)
copy = staff[:] # Copy full
print(copy, end="\n\n")

copy = staff # Assigns to staff's pointer, pointing copy to the same place in memory
copy[0] = "Cider"
print(staff)
print(copy)
INFO