-
-
Save trivial-search/7c4e5ef23e452a7724c5b0a34f902c16 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
list_2 = [] #create a blank to be populated list | |
for x in range(len(list_1)): # loop through the lenght of the original list | |
if list_1[x] == ' ': # if the value at that particular index is a blank space | |
list_2.append(x) # add the index to the new list | |
print(list_2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment