Origin:https://leetcode-cn.com/problems/robot-return-to-origin/
学会了Python中直接对字符串中元素计数:
str.count(element, start=0, end=len(str))
count() 方法用于统计字符串里某个字符出现的次数。可选参数为在字符串搜索的开始与结束位置。
位运算快速输出
return a == b and c == d
代码简洁一点
原文:https://www.cnblogs.com/scyq/p/11650877.html