0
python program showing irrelevently invalid syntax
i=int(input("enter any no.")) m=0 l=[] while i>0: m=i%2 if m = 1: m=0 l.append(m) if m=0: m=1 l.append(m) i=i//2 print(l) in this code it's showing that if statement's syntax is invalid. plz tell why ?
2 Answers
+ 1
thank you đ
0
Indentation and the difference between "=" and "==" are sneaky killers.