Skip to content

Vuyisile Ndlovu

Musings of a backend Software Developer

  • Home
  • Articles
  • Contact Me

Tag: tips

Posted on 7th January 2017 by Vuyisile

Python List Comprehensions

1 Comment

A special syntax form in the Python language is the list comprehension. List comprehensions allow programmers to make their code more compact and (sometimes) harder to read if they push the comprehensions too far! The syntax consists of an expression in square brackets to create a new list. In order to show the beauty of
Continue reading Python List Comprehensions

Posted on 29th December 20162nd November 2018 by Vuyisile

The python lambda

Recently I learned how to use the lambda function, a simple, unbound one liner function. A lambda is similar to a normal Python function, the only difference is in the way it is used. The example below will explain better: The poww function defined above takes an argument x and squares it. So if we
Continue reading The python lambda


© Vuyisile Ndlovu 2023
Theme: creativefocus by Mladjo.