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

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

GH
Answered by George H. Python tutor

1638 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What are the main data structures that I can use in Python


How might we implement the bubble sort algorithm in Python


Generate an array of integers from 0 to 99 and split it into two smaller arrays. Each smaller array will contain half of the original.


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 .


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences