How to return x value from (x,y) coordinates in a set

后端 未结 0 1543
心在旅途
心在旅途 2020-11-29 20:43
def has_x_value(cs,x):
      tuple_convert = list(cs)
      x_values = [x[0] for x in tuple_convert]
      for i in x_values:
         if i == x:
             return         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题