0

so i have two lists of IP's both are same but when i run if condition on them them, it is showing they are not equal, as they have different braces i am not sure how to solve this as i am getting theses values from web requests from BOTO3

ip_list_ips = {'54.183.255.128/26', '15.177.16.0/21', '54.245.168.0/26'}
sg_rule_ips = ['54.183.255.128/26', '15.177.16.0/21', '54.245.168.0/26']

if ip_list_ips == sg_rule_ips:
   print("lists are same ")
else:
   print("not same")

here it always returns as not same, it is because of different braces, if just run this line by changing "{" to "[", it works and i don't know how to proceed because i get these variables by sending API requests and filtering the output

glibdud
  • 7,550
  • 4
  • 27
  • 37
chandra
  • 693
  • 3
  • 8
  • 21

0 Answers0