So I am working on the Blossoms project in the computer science path. The instructions say:
payload is not
None , then we know it’s a list that looks like
[key, value] .
Check the first item (
payload ) and compare it with
key . If they are the same, return the second item in
payload (the value!).
None or the first item is not the same as
key , return
So the code I wrote is: https://gist.github.com/357d0309183c75006b11e07a9ef7ee34
But when I watched the video to compare they had something slightly different. what they had is:
if payload != None
Is the code in the video not wrong since it don’t cover the case of the first item not being the same as the key?