0
/ 1.0
Write a function first10(s)
that returns the first 10 characters of s
. If s
is longer than 10 characters, just truncate it. If s
is...
Write a function first10(s)
that returns the first 10 characters of s
. If s
is longer than 10 characters, just truncate it. If s
is shorter, pad it with spaces at the end of the string.
Examples:
first10("012345678901234") -> "0123456789"
first10("012345") -> "012345 "
Your feedback will appear here when you check your answer.