Unit 3 | Vocabulary + Examples
list = ["apples", "cherries", "peaches"]
print(list)
arr=[[1,2,3],
[4,5,6],
[7,8,9]]
print(arr)
thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(thisdict)
class MyClass:
x = 5
p1 = MyClass()
print(p1.x)
def isPalindrome(s):
return s == s[::-1]
# Driver code
s = "malayalam"
ans = isPalindrome(s)
if ans:
print("Yes")
else:
print("No")
cars = ["Aston", "Audi", "McLaren"]
i = 0
while (i < len(cars)):
print (cars[i])
i += 1
def my_function(parameter):
print(parameter + " Refsnes")
my_function("Emil")
my_function("Tobias")
my_function("Linus")