Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator

Tell us what’s happening:
Hi, everyone,
I am taking this general course about Python.
The result of my code shows array[], array[]...,
though I am seeking a way not to show such words “array” but the result inside the bracelet directly.
Thank you all for reading.

Your code so far

        import numpy as np

def calculate(list):
  if len(list)<9:
   print("List must contain nine numbers.")
  calculations={  'mean': [b],'variance': [c],'standard deviation': [d],'max': [e],'min': [f],'sum': [g] }
  return calculations

Your browser information:

Challenge: Mean-Variance-Standard Deviation Calculator

Link to the challenge:

So, you get for example 'mean': [(array([3.66666667, 5. , 3. ]), array([3.33333333, 4. , 4.33333333]), 3.888888888888889)] , the outer square parenthesis is because you have written 'mean': [b], removing the square parenthesis you get instead 'mean': (array([3.66666667, 5. , 3. ]), array([3.33333333, 4. , 4.33333333]), 3.888888888888889) - the square parenthesis

the rest is because of what the value of b is
add print(b) and you get (array([3.66666667, 5. , 3. ]), array([3.33333333, 4. , 4.33333333]), 3.888888888888889)
if you don’t want that you need to change the value of b

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Thank you for the advice!!

you can convert array to list like this :

b = [(np.mean(a,axis=0)).tolist(),(np.mean(a,axis=1)).tolist(),np.mean(a)]