What is the output of and explanation

0 votes

print list + tinylist * 2

if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]

tinylist = [123, 'john']?

Can someone explain me as what is the working over here?

Jul 20, 2018 in Python by eatcodesleeprepeat
• 4,770 points
96 views

1 answer to this question.

0 votes

It will print concatenated lists. Output would be

['abcd', 786, 2.23, 'john', 70.2, 123, 'john', 123, 'john'].

answered Jul 20, 2018 by Priyaj
• 58,100 points

Related Questions In Python

0 votes
0 answers

what is the use of args and kwargs in python?

can you an example for each? READ MORE

May 10, 2019 in Python by Waseem
• 4,540 points
232 views
0 votes
1 answer

What is the inverse operation of np.log() and np.diff()?

Hello @kartik, The reverse will involve taking the ...READ MORE

answered Jun 15, 2020 in Python by Niroj
• 82,680 points
1,659 views
0 votes
1 answer

What will be the output of below code and why? x=[1,2,3,4,5] print(x.insert(2,3))

If you write x.insert(2,3) and then print x ...READ MORE

answered Oct 14, 2020 in Python by Gitika
• 65,870 points
852 views
0 votes
1 answer

what is the output of m = np.array([2,4,6]) n = np.array([2, True, False]) print(m+n)

Hi. @Nandini, The above code will give you ...READ MORE

answered Nov 11, 2020 in Python by Gitika
• 65,870 points
54 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,975 views
0 votes
0 answers
0 votes
1 answer

What is the difference between Python and IPython?

There are few differences between Python and ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 58,100 points
2,341 views