46
JohanO
8y

Christmas song rebus:

Comments
  • 22
    Ah, he's checking it once, he's checking it's twice.

    Clever.

    But in this example he's not actually checking the list twice, only the existence of the list. Another great example of lacking project requirements.
  • 4
    Yeah, Santa got some lousy specifications there
  • 7
    @erikdreyer11 ask Santa ;-)

    "He's making a list, and checking it twice, gonna find out who's naught or nice"
  • 2
    @pxgamer coal again
  • 0
    @TktStatusPICNIC I don't know. I don't python. 😂

    But I assume that it's like JavaScript, where p is the index of non_list.
  • 0
    Nope.

    If you try and iterate over something that is not iterable it'll say so. None is not iterable.

    @TktStatusPICNIC
  • 0
    unlike js, p does represent that object fortunately. I always end up using jquery's $.each when I can because of that

    @kanduvisla
  • 0
    @kyleperik thanks. I agree that js's approach also is a bit questionable. ES6 introduced a lot of better approaches to this problem. Python is still on my to-do list to learn, but haven't found a good use case for it yet.
  • 0
    What text editor or IDE are you using?
  • 3
    @Bubbles I'm using PyCharm and haven't yet found anything better
Add Comment