给出适当数据结构的引用,第二个子例程将它转换为XML文档,根据参数的不同,产生的XML文档采用字符串格式或文件形式。
Given a reference to an appropriate data structure, the second converts it to an XML document, either in string format or as a file, depending upon its parameters.
尽管不能“按位置”修改字符串(如字节组),但程序可以引用字符串的元素或子序列,就象使用任何序列一样。
A program can refer to elements or subsequences of strings just as with any sequence, although strings, like tuples, cannot be modified "in place."
除了索引之外,字符串还支持切片操作。索引用来表示单个字符,切片允许你包含子串。
In addition to indexing, slicing is also supported. While indexing is used to obtain individual characters, slicing allows you to obtain substring.
除了索引之外,字符串还支持切片操作。索引用来表示单个字符,切片允许你包含子串。
In addition to indexing, slicing is also supported. While indexing is used to obtain individual characters, slicing allows you to obtain substring.
应用推荐