标签:循环 style nbsp list pre index book rate lambda
book = ‘Python程序设计‘ result = reduce(lambda x,y:y+x,book) print(result)
book = ‘Python程序设计‘ print(book[::-1])
result = reversed(list(book)) print(‘‘.join(result))
book = ‘Python程序设计‘ lenbook = len(book) - 1 result = ‘‘ for index,value in enumerate(book): result += book[lenbook - index] print(result)
目前只想到这些...
标签:循环 style nbsp list pre index book rate lambda
原文地址:https://www.cnblogs.com/fuxuhao/p/11963607.html