Category «Python»

Python New versions

In the last few years python released a lot of versions lets have a summary of these versions and features. Note: Spark runs on Java 8/11, Scala 2.12, Python 3.6+ and R 3.5+. Java 8 prior to version 8u92 support is deprecated as of Spark 3.0.0. For the Scala API, Spark 3.1.2 uses Scala 2.12.

List Comprehension

Python supports a concept called “list comprehensions”. It can be used to construct lists in a very natural, easy way, like a mathematician is used to do.┬áList comprehension is a complete substitute for the lambda function as well as the functions map(), filter() and reduce().Usually we write mathematical collection of prime numbers, even and odd …

How to start with Python

When it comes to learning an object-oriented programming language, you might consider starting with either Python or Java. While Python can be more user-friendly than Java, as it has a more intuitive coding style, both languages do have their unique advantages for developers and end users. However, if you are just beginning your path towards …

Mutable vs immutable

Mutable and immutable are English words meaning “can change” and “cannot change” respectively. The meaning of the words is the same in the IT context; i.e. a mutable string can be changed, and an immutable string cannot be changed Python code: