python 我想知道这句的具体含义:this only works with two literals,not with arbitrary string express什么是arbitrary string expression,什么事literals,有什么区别Two string literals next to each other are automatically concatenated; t
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/30 07:39:33
![python 我想知道这句的具体含义:this only works with two literals,not with arbitrary string express什么是arbitrary string expression,什么事literals,有什么区别Two string literals next to each other are automatically concatenated; t](/uploads/image/z/13157673-33-3.jpg?t=python+%E6%88%91%E6%83%B3%E7%9F%A5%E9%81%93%E8%BF%99%E5%8F%A5%E7%9A%84%E5%85%B7%E4%BD%93%E5%90%AB%E4%B9%89%3Athis+only+works+with+two+literals%2Cnot+with+arbitrary+string+express%E4%BB%80%E4%B9%88%E6%98%AFarbitrary+string+expression%2C%E4%BB%80%E4%B9%88%E4%BA%8Bliterals%2C%E6%9C%89%E4%BB%80%E4%B9%88%E5%8C%BA%E5%88%ABTwo+string+literals+next+to+each+other+are+automatically+concatenated%3B+t)
python 我想知道这句的具体含义:this only works with two literals,not with arbitrary string express什么是arbitrary string expression,什么事literals,有什么区别Two string literals next to each other are automatically concatenated; t
python 我想知道这句的具体含义:this only works with two literals,not with arbitrary string express
什么是arbitrary string expression,什么事literals,有什么区别
Two string literals next to each other are automatically concatenated; the first
line above could also have been written word='Help''A'; this only works with two literals,not with
arbitrary string expressions:
python 我想知道这句的具体含义:this only works with two literals,not with arbitrary string express什么是arbitrary string expression,什么事literals,有什么区别Two string literals next to each other are automatically concatenated; t
Python Tutorial?
这里的意思是,两个邻接的字符串会被自动拼接在一起.但这一规则不能对任意的字符串表达式起作用.
>>> "help" "a"
'helpa'
>>> "help" "abdfgdsaf".strip()
'helpabdfgdsaf'
>>> "string".strip() "help"
SyntaxError: invalid syntax