Hi folks having a slight brain fart here 
Say I have a list of the following elements
['','','a','b','c']
Now my aim is to compare two adjacent elements, if the first one is blank and the next in the list isn't then swap the elements, otherwise do nothing. So at the end of the processing the list should look like
['a','b','c','','']
I'm using a bubble sort type comparison thing, but i'm not entirely sure if this is correct. Can a kind person have a look at the following for me and say if i'm getting it right?

Say I have a list of the following elements
['','','a','b','c']
Now my aim is to compare two adjacent elements, if the first one is blank and the next in the list isn't then swap the elements, otherwise do nothing. So at the end of the processing the list should look like
['a','b','c','','']
I'm using a bubble sort type comparison thing, but i'm not entirely sure if this is correct. Can a kind person have a look at the following for me and say if i'm getting it right?
Code:
import sys
import string
import techrtime
address_fields = 0
def format_address:
full_address = techvars.full_address
address_list = full_address.split()
address_fields = len(address_list)
for current in range(len(address_list)):
for record in range(len(address_list)):
if ((address_list[current] == "")&&(address_list[record] == "")):
else:
address_list[current] = address_list[record]
address_list[record] = ""
break