What Will Be The Output Of The Following Python Codep Pre #390
What will be the output of the following Python code?</p> <pre><code class="language-python"> print(list(zip((1,2,3),('a'),('xxx','yyy')))) print(list(zip((2,4),('b','c'),('yy','xx')))) </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Lists - Python Lists - Quiz No.6.
What will be the output of the following Python code?
print(list(zip((1,2,3),('a'),('xxx','yyy')))) print(list(zip((2,4),('b','c'),('yy','xx'))))
[(1,2,3),(‘a’),(‘xxx’,’yyy’)] [(2,4),(‘b’,’c’),(‘yy’,’xx’)]
[(1, 'a', 'xxx'),(2,’ ‘,’yyy’),(3,’ ‘,’ ‘)] [(2, 'b', 'yy'), (4, 'c', 'xx')]
Syntax error
[(1, 'a', 'xxx')] [(2, 'b', 'yy'), (4, 'c', 'xx')]