Changed python code of bubble sort - instead of using two functions, one function is used and all we need to do is to write the driver code and call the function and it will result in a sorted list(or array)