Created
May 31, 2016 17:35
-
-
Save adarsh0806/02d8e1d54d510294e75dfbc0d9bd7059 to your computer and use it in GitHub Desktop.
delete_first
This file contains hidden or 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 delete_first(self): | |
deleted = self.head | |
if self.head: | |
self.head = self.head.next | |
deleted.next = None | |
return deleted |
GrvExplorer
commented
Mar 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment