I want to sort list alphabetical order python [on hold]

292
November 29, 2017, at 01:03 AM

I have this list:

output_list= ['pop,4'
,'ants,1'
,'crop,1'
,'poet,1'
,'cat,2'
,'apple,1'
,'toe,1'
,'can,1'
,'long,1'
,'dog,1']

I want to sort it alphabetically like this:

['ants,1'
,'apple,1'
,'can,1'
,'cat,2'
,'crop,1'
,'dog,1'
,'long,1'
,'poet,1'
,'pop,4'
,'toe,1']

I tried using sorted but it's not working for me. Any help?

Rent Charter Buses Company
READ ALSO
Use Python to replace a string in a HTML table

Use Python to replace a string in a HTML table

My Python program is having a hard time with the symbol &#10004 and I want to replace it with the word "PASS"

325
Create a matrix with mean 0 and covariance 2 in python using numpy

Create a matrix with mean 0 and covariance 2 in python using numpy

I work with stochastic process and I'm creating a controller that needs to works with noise perturbations

332
Tensorflow: Custom Estimator with tfrecords input does not train properly

Tensorflow: Custom Estimator with tfrecords input does not train properly

I currently try to write a tensorflow-model using a custom tfestimator

351