I would like to know what if the difference with and without square bracket
Here is my code without square bracket in the if statement, which answer is correct.
a=[3,90,3,7,8,100]
if sum(a)<100:
a.append(2)
print(a)
While if I put the square bracket, it will be wrong, Can anyone explain it to me?
a=[3,90,3,7,8,100]
if [sum(a)<100]:
a.append(2)
print(a)