I am using django to pull some data from the MySQL server I have. Currently I have it pulling a whole column of data (the “light” column) from the SQL server.
To do this I am using the following code
weather = weatherdata.objects.values_list('light', flat=True)
lightdata = list(weather)
When I do this the lightdata list looks like this:
[35L, 53L, 77L, 99L, 49L, 46L, 28L, 13L, 2L, 0L, 0L, 0L]
Those values are correct, its just there is an L at the end of each of these. How can I remove the L from this list?
You can do something like this:
Also if you want to delete the replicated items: