SparkSession.
version
The version of Spark on which this application is running.
New in version 2.0.0.
the version of Spark in string.
Examples
>>> _ = spark.version