How do I convert a string to a condition for the lambda function in python?
Eg: strA = 'x > 1'
result = list(filter(lambda x: strA, my_list))
https://stackoverflow.com/questions/67013714/convert-string-to-function-condition-python April 09, 2021 at 09:02AM
没有评论:
发表评论