Write a function @kth_word(s, k)@ that given a string
and an integer
returns the $k{\it th}$ word in string
.
If
has less than
words it returns the empty string. We assume all characters of
are letters and spaces. Warning: do not use the
split string method.
Author: ProAl
Generation: 2026-01-25T17:48:05.012Z
© Jutge.org, 2006–2026.
https://jutge.org