Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Sep 19th, 2018
85
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.14 KB
| None
|
0
0
raw
download
clone
embed
print
report
nums = [1,1,0,1,1]
oFlag = 1
res = []
for x in nums:
if x == 0:
oFlag = 0
res.append(oFlag)
print(res)
# Output: [1,1,0,0,0]
Add Comment
Please,
Sign In
to add comment
Public Pastes
BøtteGrafGen
Python | 1 min ago | 0.72 KB
correction-draft
JavaScript | 5 min ago | 4.98 KB
Untitled
C# | 11 min ago | 2.92 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 💰
GetText | 41 min ago | 0.38 KB
slitki
Lua | 41 min ago | 0.30 KB
polzovateli
Lua | 43 min ago | 0.32 KB
Untitled
C# | 44 min ago | 3.02 KB
nuklear
Lua | 45 min ago | 0.33 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!