#๐ Please tell me how to find list & average
13 messages ยท Page 1 of 1 (latest)
@green cove
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
I dont understand what you specifically need help with, can you explain more exactly?
you have a list of lists with one value each, as a string. First put it in a format you can deal with, like a list of ints
you can just use something like average found in numpy
like print(numpy.average(your_list))
!e
lst = [['157'], ['147']]
lst = [int(x[0]) for x in lst]
print(lst)
@primal forge :white_check_mark: Your 3.12 eval job has completed with return code 0.
[157, 147]
I've no idea what the actual list is tho
but print(list1) will just return values that are stored in the list1 list
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.