0
Expected an indented block & isnât this how we write condition in python for if else?
num=[1,2,3] If 1 in num : print(âavailable â) else: print(ânot available â) Expected an indented block in line 3
3 Answers
+ 2
'''
leave some spaces before print statement and you're good to go.
here's the valid code
'''
num=[1,2,3]
if 1 in num :
print("available ")
else:
print("not available ")
Please revise your python course again Abhishek
https://www.sololearn.com/Course/Python/?ref=app
+ 1
here's the fixed code, can't explain since there were a lot of errors:
num=[1,2,3]
a = 1
if a in num:
print("available")
else:
print("not available")
0
I=1
While i<=5:
print(I)
I=i+1
print("finished")