Hello Everyone,
I was watching a video about Spark and then the tutor said that we have to work on Python 3.5 to run error-free code. I download it and configured everything needed to run Spark. Then i tried to run the following piece of code:
But unfortunately python interpreter gave me the following error:
Question: How to tweak the tuple unpacking problem and get the same result? I tried swap function but it pass objects by values not by ref.
Thank you for reading.
I was watching a video about Spark and then the tutor said that we have to work on Python 3.5 to run error-free code. I download it and configured everything needed to run Spark. Then i tried to run the following piece of code:
flipped = movieCounts.map(lambda(x,y):(y,x))
But unfortunately python interpreter gave me the following error:
Error:tuple unpacking is not supported in Python 3
The tutor tutorial back to 2015, so it could be that tuple unpacking was not deprecated at that time.Question: How to tweak the tuple unpacking problem and get the same result? I tried swap function but it pass objects by values not by ref.
Thank you for reading.