String Slicing - Guess the output! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

String Slicing - Guess the output!

What is the output? user= 'ramukaka' password=user[4::]+user[2::-1]+'u' print password

5th Apr 2018, 4:12 PM
Shashank Bafna
Shashank Bafna - avatar
2 Answers
+ 2
It works though for me, for < v2.7
5th Apr 2018, 4:21 PM
Shashank Bafna
Shashank Bafna - avatar
0
kakamaru
5th Apr 2018, 4:34 PM
Maninder $ingh
Maninder $ingh - avatar