






'''simple docstring'''




import operator







def       __UpperCAmelCase						(  lowerCamelCase_     ,      lowerCamelCase_ = False     ,      lowerCamelCase_ = None)							->     list:
		UpperCamelCase__				:					Union[str, Any]					=					operator.lt if reverse else operator.gt
		UpperCamelCase__				:					List[str]					=					solution or []

		if not arr:
				return solution

		UpperCamelCase__				:					Tuple					=					[arr.pop(0)]
		for i, item in enumerate(lowerCamelCase_):
				if _operator(lowerCamelCase_     ,      sublist[-1]):
						sublist.append(lowerCamelCase_)
						arr.pop(lowerCamelCase_)

    #  merging sublist into solution list
		if not solution:
				solution.extend(lowerCamelCase_)
		else:
				while sublist:
						UpperCamelCase__				:					List[Any]					=					sublist.pop(0)
						for i, xx in enumerate(lowerCamelCase_):
								if not _operator(lowerCamelCase_     ,      lowerCamelCase_):
										solution.insert(lowerCamelCase_     ,      lowerCamelCase_)
										break
						else:
								solution.append(lowerCamelCase_)

		strand_sort(lowerCamelCase_     ,      lowerCamelCase_     ,      lowerCamelCase_)
		return solution


if __name__ == "__main__":
		assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
		assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]












'''simple docstring'''




import requests
from bsa import BeautifulSoup







def       __UpperCAmelCase						(  lowerCamelCase_ = "AAPL")							->     str:
		UpperCamelCase__				:					str					=					f'https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'
		UpperCamelCase__				:					Optional[Any]					=					BeautifulSoup(requests.get(lowerCamelCase_).text     ,      'html.parser')
		UpperCamelCase__				:					Union[str, Any]					=					'My(6px) Pos(r) smartphone_Mt(6px)'
		return soup.find('div'     ,      class_=class_).find('span').text


if __name__ == "__main__":
		for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
				print(f'''Current {symbol:<4} stock price is {stock_price(symbol):>8}''')




