[問題]reverse string
Please write a function to inverse a string. This function accept a string
argument and return the reversed string. For example,
reverse (‘apple’) returned ‘elppa’
reverse(‘madam’) returned ‘madam’.
Hine:
(1) set local variable y = ‘’。
(2) from right to left, read a char from input string and append to the end
of y.
(3) return y as result
reverse 要怎麼寫?
我只是個新手希望大家幫幫我~~謝謝:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.44.148.189
推
11/28 21:39, , 1F
11/28 21:39, 1F
→
11/28 21:39, , 2F
11/28 21:39, 2F
Python 近期熱門文章
PTT數位生活區 即時熱門文章