Created
August 10, 2020 08:12
-
-
Save Cyril-Pop/ff8591d01fdc0246260f3bdae4c4a38b to your computer and use it in GitHub Desktop.
complete Py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lstvar = ["A","B","C","","","D","F","","G","","",""] | |
newlst =[] | |
for x in lstvar: | |
if x != "": | |
newlst.append(x) | |
else: | |
newlst.append(newlst[-1]) | |
print newlst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment