+ 2

How can i print the last letter of a word, slicing method, while the letters of the word is unknown?

2nd Sep 2017, 3:05 AM
Shantanu Kundu
Shantanu Kundu - avatar
2 odpowiedzi
+ 6
"yourword"[-1]
2nd Sep 2017, 3:10 AM
Dapper Mink
Dapper Mink - avatar
+ 3
Why do you need to use modulo operator when slicing is more suitable for the job?
1st Sep 2017, 8:18 PM
Ghauth Christians
Ghauth Christians - avatar