88633/what-will-be-the-output-of-below-code-and-why-print-x-insert-2-3
What will be the output of the 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 them it would show [1,2,3,3,4,5]
It will show nothing in your code as insert does not return anything
Try using this question by list comprehension: a=[4,7,3,2,5,9] print([x for ...READ MORE
Hey @abhijmr.143, you can print array integers ...READ MORE
It will print concatenated lists. Output would ...READ MORE
xrange only stores the range params and ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
You can go through this: def num(number): ...READ MORE
Hi. @Nandini, The above code will give you ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.