0
why we you if and else in python
2 odpowiedzi
+ 8
Abdul Rehman shabu ,
It is to check conditions...
Go through python courses for better understanding...
for example,
a=1
if a==1:
print ('true')
else:
print ('false')
if first condition satisfied statement inside that condition block will be executed or the other statement will be executed
+ 6
Abdul Rehman shabu ,
> see this 2 short sololearn tutorials about if... elif... else...
> you should also start learning from the regular python tutorials. this covers all about your requested item.
https://www.sololearn.com/learn/Python/2277/?ref=app
https://www.sololearn.com/learn/Python/2278/?ref=app