Following set of commands are executed in shell, what will be the output? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 3

Following set of commands are executed in shell, what will be the output?

>>>str="hello" >>>str[:2] >>>

2nd Feb 2018, 11:41 AM
Akshaya
Akshaya  - avatar
3 ответов
+ 4
"he" you take first two chars (indices 0 and 1)
2nd Feb 2018, 12:03 PM
michal
+ 1
thanks
3rd Feb 2018, 4:19 AM
Akshaya
Akshaya  - avatar
0
Yehhh correct!
6th Feb 2018, 3:03 PM
sreerag.s
sreerag.s - avatar