-
-
Save holocronweaver/4115478 to your computer and use it in GitHub Desktop.
Ben's replace_item function
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
def replace_item(inventory, item): | |
for item in range( len(list) ): | |
if item != new_item: | |
list[item] = new_item | |
return list | |
inventory = range(26) | |
new_item = "" | |
print replace_item(inventory, new_item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment