Post

Dino
Dino@DinoStraciatela·
@Python_Dv The answer is C [:3] takes Dhoni from the beginning but *not* including the 3 index, That's "D" (index 0), "h" (index 1) and "o" (index 2). Name 2[1:] goes from the index 1 of "Kohli" to the end. Index 0 is "K" and index 1 is "o". Hence "Dhoohli".
English
0
0
7
878
Sonya Castro
Sonya Castro@sonyac_dev·
@Python_Dv C. "Dhoohli" ➡️ name1[:3] from the start (0) to 3 position "Dho" ➡️ name2[1:] from 1 position to the end "ohli"
English
2
0
5
1.4K
Brahmareddy
Brahmareddy@BrahmaWritings·
@Python_Dv Dhoohli is the answer. Option ‘C’.
Texas, USA 🇺🇸 English
0
0
4
534
Data Pragmatist
Data Pragmatist@datapragmatist·
@Python_Dv The code combines the first three letters of "Dhoni" with all letters from the second letter onward in "Kohli," resulting in "Dhohli."
English
1
0
4
848
louiscodes
louiscodes@AduLumumba·
@Python_Dv C name1[:3] = Dho name2[1:] = ohli Concatenating the two would give you Dhoohli which isC
English
0
0
2
942
Ademola
Ademola@A_d_e_m_o_l_a_·
@Python_Dv C. Because: The variables where sliced and concatenated. I.e. name1[:3] + name2[1:] => `Dho` +` ohli` => Dhoohli
English
0
0
1
59
Sujan Mandal
Sujan Mandal@SujanCodeNerd·
@Python_Dv name1 = "Dhoni" name2 = "Kohli" result = name1[:3] + name2[1:] print(result) #Dhoohli☺️😚
Lietuvių
0
0
0
16
Paylaş