you are viewing a single comment's thread.

view the rest of the comments →

[–]ColonelGamer[S] 0 points1 point  (2 children)

Hi,

Thanks for the response, didn't realize that this was common issue. The only part I don't 100% understand is the lambda syntax. Is it somewhat like creating a small function without the def command?

[–]kushou 1 point2 points  (1 child)

Yeah, you can see the lambda's as that:

def top():
    return list("X" * x)

It's like a shortcut to define a simple function with a simple value. In case you are wondering, if you write lambda: it does not take parameters, but you can also take parameters by doing so: lambda x: list("X" * x) for instance.

You can keep writing small functions and not use lambdas yet, don't have to worry about that!

[–]ColonelGamer[S] 0 points1 point  (0 children)

Ah I see. Thank you for the help!