Code bellow prints each line for multiple output. Is it possible to print this output into single line:
reservations = ec.describe_instances().get('Reservations', []) for reservation in reservations: for instance in reservation['Instances']: tags = {} for tag in instance['Tags']: tags[tag['Key']] = tag['Value'] if tag['Key'] == 'Name': name=tag['Value'] if not 'Owner' in tags or tags['Owner']=='unknown' or tags['Owner']=='Unknown': result="" result.join(name)Current Output:
Output:aws-opsworks
Ansible
Desired output:Output:aws-opsworks Ansible