python 字符串转元组

时间:2026-02-15 06:50:23

1、使用字符串定义一个字符串变量。

python 字符串转元组

2、使用 split() 方法将字符串分割成一个列表。

python 字符串转元组

3、将列表转换为元组。

python 字符串转元组

4、打印元组。

python 字符串转元组

5、将字符串直接转换为元组。

python 字符串转元组

© 2026 海能知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com