What is the outcome of the following code? print(2*[3,4,5])

[3, 4, 5, 3, 4, 5] will be printed.

Answered by George H. Python tutor

1585 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What can be used to iterate through a list in python?


Given a list of N numbers, use a single list comprehension to produce a new list that only contains those values that are: (a) even numbers, and (b) from elements in the original list that had even indices .


What are recursive functions and when should they be used?


Describe both For-loops and While-loops and explain how you can simulate the effect of a for loop with a while loop with an example.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences