s = "Hello World"
s.append("aaa")
t = s + "aaa"
print(t)
import csv
def read_building(fname):
with open(fname) as f:
data = csv.reader(f,delimiter=',')
for row in data:
print("insert into BUILDING values ('"+row[0].strip()+"','"+row[1].strip()+"');")
def main():
read_building("building-codes.csv")
main()
numbers = [10,20,15,40]
sum = 0
for x in numbers:
sum = sum + x
print(sum)
numbers = [10,20,15,40]
product = 1
for x in numbers:
product = product * x
print(product)
def add_numbers(nums):
sum = 0
for x in nums:
sum = sum + x
return(sum)
print(add_numbers([1,2,3]))
print(add_numbers([10,40,90]))