1def squareodd(num):
2 #lst = () # 'tuple' object has no attribute 'append'
3 lst = []
4 for i in num:
5 # if num % 2 == 1: # you are trying to use the % (modulo) operator on the list instead on item of list
6 if i % 2 == 1:
7 lst.append(i**2)
8 return lst
9