Car*_*bon 5 python r infix-operator
在R中!实际上是一个中缀运算符`!`,所以语句就像
Map(`!`,c(T,F,F))
Run Code Online (Sandbox Code Playgroud)
完全有效.有没有办法访问不在Python中的第一个订单对象?我一直在谷歌搜索没有成功.
Python有这个operator模块,它包含一个operator.not_()函数:
import operator
map(operator.not_, (True, False, False))
Run Code Online (Sandbox Code Playgroud)
not本身就是布尔运算符之一.