This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long_string = "This is a very long string!" | |
# 将多个if判断转化为数组,keys中多个元素为and关系 | |
conditions = [ | |
{"keys": ["Andy"], "result": "string1"}, | |
{"keys": ["Jack"], "result": "string2"}, | |
{"keys": ["Jim","Mike"], "result": "string3"}, | |
] | |
def find_result(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"reflect" | |
"testing" | |
) | |
type addAble interface { | |
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float64 | ~float32 | ~string | |
} |