+ 1
Please tell me the explanation of below code
list=['(',1,2] index=2 list.insert(index,",") print(*list,end=")")
7 Antworten
+ 5
Om Yele Already you got answer. If you want to ask other question create new but before that use search bar.
Keep learning message feature will be activated.
+ 2
Om Yele
You need to mail , to resolve it. May be problem with your account or not using app regularly.
mailto: info@sololearn.com
+ 1
list=['(',1,2] # initial list
index=2
list.insert(index,",") # adding ', ' at index 2 in list
print(*list,end=")") # printing list values as space separated with ')' is at end on console.
So output is:
( 1 , 2 )
# finally, and list is [ '(', 1, ', ' , 2 ]
+ 1
What is *list
+ 1
Unpacking the list. List values printed by space separating..
https://www.sololearn.com/Discuss/2521834/?ref=app
+ 1
Thankyou very much , Jayakrishna
+ 1
I want to message someone then i don't able to message someone on this app