Python3+2 does not change linear printing, and is mainly used for groups in the progress bar.

Python3 does not change font printing, and is mostly used for the progress bar

    process = 0  # process bar
    for i in user:  
        process += 1
        print("\rProcess: %f " % (process/len(user)), end='')

More patterns:

    print('\r loading... %.2f %%' % (process/len(user)*100), end='')


For PY2, the main role is the comma at the end:

    print '\r loading... {:.3f}' .format( (float(proces))/len(user)*100 ) ,
  print('%.3f' % 1.12345678)     # Let's take 3 decimal places

Leave a Comment