If only string maps were known to human kind :)

  • @WaveWood
    link
    English
    171 year ago

    Clearly the issue is that they are using switch cases instead of if statements /s

  • @bwrsandman
    link
    English
    101 year ago

    Maps? Could get away with an array!

  • @Kojak747
    link
    English
    41 year ago

    For shame, I recently did something like this, but only because a/ I have been programming for 3 weeks and b/ told chat gpt to edit my code. Either way, we both failed. Use arrays people!

  • Ignisnex
    link
    English
    31 year ago

    Case with numbers? I really want to change that to an enum or something lol.

  • @nbdy
    link
    English
    31 year ago

    How about a dict[int, str], which holds your case and newscript?

  • @MelodiousShark
    link
    English
    21 year ago

    Yes there is and, at least on reddit, you’d have people defending this code for no reason other than it works and the only bad code is code that doesn’t work or something stupid like that.

  • @shotgun_crab
    link
    English
    11 year ago

    I love how they even copied the comment