Class Solution(object): def maxProfit(self, prices): “” :type prices: List[int] : Int “” zong = 0 for I in range(len(prices)-1): if prices[I +1]>prices[I]: zong+= (prices[I +1]-prices[I]) return zong