Python index question?
Given a string of any length named s, extract and then print the first and last characters of the string (with one space between them).
For example, given
s = 'abcdef'
The output will be 'a f'
- EddieJLv 77 months agoFavorite Answer
x = s  + " " + s [-1]
Still have questions? Get your answers by asking now.