Post

Python Developer
Python Developer@Python_Dv·
Comment below the output! 😃👇
Python Developer tweet media
English
10
3
78
6.7K
Premakumar Thevathasan (Prem Iyer)
Premakumar Thevathasan (Prem Iyer)@KumarT00623760·
@Python_Dv Options provided: A. v1=P, v2=['Y', 'T', 'H'] - Incorrect (the slice only includes 'Y' and 'T') B. v1=[P], v2=['Y', 'T'] - Incorrect (v1 is not a list) C. v1=P, v2=['Y', 'T'] - Correct D. Error - Incorrect (there is no error in the code) Answer is: C. v1=P, v2=['Y', 'T'] =>
Premakumar Thevathasan (Prem Iyer) tweet media
English
0
0
4
230
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv Correct : Option C list('PYTHON') creates ['P','Y','T','H','O','N'] List[0] → 'P' List[1:3] → ['Y', 'T'] (end index is excluded)
English
0
0
2
281
Earnest Codes
Earnest Codes@Earnesto037·
@Python_Dv Answer: (C) v1=P, v2=['Y', 'T'] The code first initializes a list List with the characters of the string 'PYTHON', resulting in ['P', 'Y', 'T', 'H', 'O', 'N']. Next, it creates a tuple values containing two elements: List[0] retrieves the first element of
English
1
0
2
276
zoeast
zoeast@datcreamhoodie·
@Python_Dv list = p,y,t,h,o,n val = list[0], list[1 until 2] -> index 3 is excluded c. v1 = p, v2 = y t
English
0
0
0
71
Ifechukwude Nwoko
Ifechukwude Nwoko@IFECHUKWUD37623·
@Python_Dv C .format(*values) process the variable (values) into individual components
English
0
0
0
211
Paylaş