Predict the correct output of the below code snippet.

sc.parallelize(["C,29","B,9","A,18"]).map(lambda x:x.split(",")).sortBy(lambda x:x[1]).collect()

[['B', '9'], ['A', '18'], ['C', '29']]

[['A', '18'], ['B', '9'], ['C', '29']]

[['B', 9], ['A', 18], ['C', 29]]

[['A', '18'], ['C', '29'], ['B', '9']]

Verified Answer
Correct Option - d

To get all Infosys Certified PySpark Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram