
好词典

缩写自英语单词 'string',源自拉丁语 'stringere',意为“绑紧”或“连接”。
❶ 在编程中,'str' 是 'string' 的缩写,表示字符串数据类型,用于存储和操作文本信息。
“In Python, you can define a str variable like this: name = 'Alice'.”
(在 Python 中,你可以这样定义一个字符串变量:name = 'Alice'。)
“The function returns a str containing the user's input.”
(该函数返回一个包含用户输入的字符串。)
str type — 指编程语言中的字符串类型,用于标识变量或参数应为字符串。
“The parameter must be of str type.”
(参数必须是字符串类型。)