mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-17 09:25:32 +00:00
'for else' fix
small logic and syntax fix
This commit is contained in:
parent
d2e0916c04
commit
b1abf6b7f3
@ -51,7 +51,7 @@ for i in x:
|
|||||||
if i == 0:
|
if i == 0:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print('found')
|
print('not found')
|
||||||
|
|
||||||
'''
|
'''
|
||||||
# Equivalent of:
|
# Equivalent of:
|
||||||
@ -60,8 +60,8 @@ for i in x:
|
|||||||
if i == 0:
|
if i == 0:
|
||||||
flag = True
|
flag = True
|
||||||
break
|
break
|
||||||
if flag
|
if not flag:
|
||||||
print('found')
|
print('not found')
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# Basic 'while' loop:
|
# Basic 'while' loop:
|
||||||
|
Loading…
Reference in New Issue
Block a user