Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
teststring = "1234567890"
print "Test String = " + teststring
print
#Get all of the items in the list one at a time as is [:]:
print "All elements in correct order [:]"
for character in teststring[:]:
print character
print
#Get all of the items in the list one at a time in reverse order [::-1]:
print "All Elements in reverse order [::-1]"
print teststring[::-1]
print
#Get the first 2 elements [0:2]:
print "The firat two elements [0:2]:"
print teststring[0:2]
print
#Get the fifth element [4]:
print "The 5th element [4]:"
print teststring[4]
print
#Every other element starting with the first [::2]:
print "Every other element starting with the first [::2]:"
print teststring[::2]
print
#Every other element starting with the second [1::2]:
print "Every other element starting with the second [1::2]:"
print teststring[1::2]
print
#Just the 4th and 7th element [3:7:3]:
print "Just the 4th and 7th element [3:7:3]:"
print teststring[3:7:3]
print
#The 7th then 4th element [6:2:-3]:
print "The 7th then the 4th element [6:2:-3]:"
print teststring[6:2:-3]
print