#!/usr/bin/python
# -*- coding: UTF-8 -*-


# 字符串反转操作
lst = []
def output(str, length):
    if length == 0:
        return lst
    lst.append(str[length - 1])
    output(str, length - 1)



str = input('请输入一个字符串:')
output(str, len(str))
print('反转序列:',lst)

 

相关文章:

  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-09-03
  • 2021-11-24
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2021-10-15
  • 2021-07-13
  • 2022-01-01
  • 2021-05-15
  • 2021-05-30
  • 2022-12-23
相关资源
相似解决方案