+ 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 Réponses
+ 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