Mar-08-2020, 01:22 PM
Hi,
I am splitting a string at a comma and then at a colon. Although this is working I think there must be a nice way.
I am splitting a string at a comma and then at a colon. Although this is working I think there must be a nice way.
cn_only = computer_attributes.split(',')[0] cn_only = cn_only.split(':')[1] timestamp_only = computer_attributes.split(',')[2] timestamp_only = timestamp_only.split(':')[1] os_only = computer_attributes.split(',')[1] os_only = os_only.split(':')[1]This there a way to do each of these in one line?