Created
August 10, 2020 08:10
-
-
Save Cyril-Pop/54b693a15418832c3b3005183f2e5054 to your computer and use it in GitHub Desktop.
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