# defining variables
#x = 40
#city = "Jackson"
#fruits = ["fruits", 8, "abc", x]
#print(x)
#print(city)
#print(fruits)

# lists versus sets
#mylist = [1, 2, 2, 7, 3, 8, 2, 7]
#print(mylist)
#print(len(mylist))
#print(type(mylist))
#myset = set(mylist)
#print(myset)
#print(len(myset))
#print(type(myset))

# Playing with lists
mylist = [1, 2, 3, 4, 5, 6, 7, 8]
print(mylist)
# element in 3-rd position; index starts at 0
print(mylist[2])
# elements in positions 4-7
print(mylist[4:8])
print(mylist[4:10])


# Playing with strings
mystring = "Alexander Reed"
print(mystring)
print(mystring[0])
print(mystring[:10])
# last element
print(mystring[-1])
# last name
print(mystring[-4:])
# you can add strings
first = "Alexander"
last = "Reed"
print(first + " " + last)

