Can any one explain below code? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
28th May 2020, 5:46 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
2 ответов
+ 5
[*p], p[k:k] = "python", "<appple>" Above code uses tuple unpacking https://www.sololearn.com/learn/Python/2485/?ref=app We can write the same as follows: [*p] = "python" p[k:k] = "<appple>" [*p] = "python" #p is a list of chars now: ['p','y','t','h','o','n'] https://code.sololearn.com/ccNpPRk4GO8M/?ref=app p[k:k] = "<appple>" #insert <appple> at index k https://www.sololearn.com/learn/Python/2453/?ref=app
28th May 2020, 6:29 PM
Kevin ★
+ 1
python I got exact answer from above link.
29th May 2020, 8:58 AM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar