Post

Rakesh Das
Rakesh Das@RakeshDas_18·
@Python_Dv B. [5, 5, '3', '4'] is the output. Reason: 1. l with elements "1", "2", "3", "4" is created. 2. The value 5 is assigned to both l[0] and l[1] . 3. Finally, the resulting list has the updated values: [5, 5, '3', '4'].
English
0
0
0
481
Prem Prakash
Prem Prakash@4EverPrem·
@Python_Dv B. l[0] = l[1] =5 = > replace values at index 0 & 1 with 5
English
0
0
0
448
EntropicX
EntropicX@mauro_zallocco·
@Python_Dv Need "list" instead of "List", otherwise error.
English
0
0
0
279
Aman
Aman@CallmeMandal·
@Python_Dv l =list("1234") This line initializes a list 'l' by converting the string "1234" into a list of individual characters. so, 'I' becomes ['1','2','3','4']. l[0]=l[1]=5 l[0] become '5' l[1] become '5' The 'l' now become ['5','5','3','4']
English
0
0
0
85
ֆeedayi 🇨🇭
ֆeedayi 🇨🇭@feedayin·
@Python_Dv `print(1/0)` will output `ZeroDivisionError`, because division by zero is undefined in mathematics.
English
0
0
0
397
Paylaş