Nov-29-2023, 01:43 AM
(This post was last modified: Nov-29-2023, 01:44 AM by gohanhango.)
I have a list containing a lot of serial numbers. Here are some of them:
hub_sn = [10001, 10002, 10003, 10004, 10005]
These serial numbers came from a monitoring database where the serial numbers would be shown as Online or Offline.
The first list is static, type-written manually. Now, from the monitoring database, I took those serial number and checked if they are online or offline.
I came up with a new list.
hub_sn_avail = [(10003, 'Online'), (10004, 'Offline'), (10002, 'Online'), (10001, 'Offline'), (10005, 'Online')]
How would I follow the order of the static list?
hub_sn = [10001, 10002, 10003, 10004, 10005]
These serial numbers came from a monitoring database where the serial numbers would be shown as Online or Offline.
The first list is static, type-written manually. Now, from the monitoring database, I took those serial number and checked if they are online or offline.
I came up with a new list.
hub_sn_avail = [(10003, 'Online'), (10004, 'Offline'), (10002, 'Online'), (10001, 'Offline'), (10005, 'Online')]
How would I follow the order of the static list?