# Methods for list in Python
list = [1, 2, 3, 4]
list.append(5)
print(list)
list.insert(1, 1.5)
print(list)
print(list.pop())
print(list)
del list[2]
print(list)
list.remove(1.5)
print(list)
list.append(2)
list.append(2)
list.append(2)
list.append(2)
print(list)
print(list.count(2))
print((54).__add__(46))
print(range(10))
# Methods for Strings in Python
s = "python programming"
print(s.center(20))
print(s.count('p'))
print(s.rjust(50))  # right justified
print(s.ljust(50))  # left justified
print(s.lower())
print(s.find('g'))  # returns the position of g
print(s.split(' '))
print(s.upper())
print(s.replace('python', 'java'))
