电脑网络

python中元组中tmp[::-1]表示

346 浏览

python中元组中tmp[::-1]表示

1 个回答

张伟伟用户头像
张伟伟 回答于 2024-07-20
已采纳

提问:python中元组中tmp[::-1]表示

网友回答:

它表示将元组逆序输出

tmp=(1, 2, 3, 4, 5 )

那么 tmp[::-1]就是

(5, 4, 3, 2, 1)


我来回答

相关问题