python根据输入一组数字打印出对应个数的*星号

python根据输入一组数字打印出对应个数的*星号

Write a function that takes a list of numbers as parameters. Then print a histogram based on those numbers. Use asterisks to draw the histogram.
写一个以数字列表为参数的函数。然后根据这些数字打印直方图。用星号画直方图。
例如,给定列表[3,7,9,5]。该函数应产生以下内容:
+++
+++++++
+++++++++
+++++

直接for循环就可以
a=[1,5,3,6]
for i in a:
print(i*'*')