python 字符串转元组

2026-02-15 06:50:23

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

python 字符串转元组

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

python 字符串转元组

3、将列表转换为元组。

python 字符串转元组

4、打印元组。

python 字符串转元组

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

python 字符串转元组

猜你喜欢