


"""simple docstring"""




def 				lowercase_		(		_A      :   Tuple						):

      """simple docstring"""




      lowerCamelCase__		:    List[Any]   =  [list(_A						) for row in matrix]
      if matrix and isinstance(_A   , _A						):
            if isinstance(matrix[0]   , _A						):
                  lowerCamelCase__		:    Dict   =  0
                  for row in matrix:
                        if prev_len == 0:
                              lowerCamelCase__		:    List[str]   =  len(_A						)
                              lowerCamelCase__		:    int   =  True
                        else:
                              lowerCamelCase__		:    Optional[int]   =  prev_len == len(_A						)
            else:
                  lowerCamelCase__		:    Optional[Any]   =  True
      else:
            lowerCamelCase__		:    Union[str, Any]   =  False

      return result

def 				lowercase_		(		_A      :   Optional[Any]						):

      """simple docstring"""




      if check_matrix(_A						) and len(_A						) > 0:
            lowerCamelCase__		:    Optional[Any]   =  [list(_A						) for row in a]
            lowerCamelCase__		:    Union[str, Any]   =  len(_A						)
            if isinstance(a[0]   , _A						):
                  lowerCamelCase__		:    List[Any]   =  len(a[0]						)
            else:
                  for dat in a:
                        print(_A						)
                  return

            # horizotal printing increasing
            for i in range(0   , _A						):
                  print(a[0][i]						)
            # vertical printing down
            for i in range(1   , _A						):
                  print(a[i][mat_col - 1]						)
            # horizotal printing decreasing
            if mat_row > 1:
                  for i in range(mat_col - 2   , -1   , -1						):
                        print(a[mat_row - 1][i]						)
        # vertical printing up
            for i in range(mat_row - 2   , 0   , -1						):
                  print(a[i][0]						)
            lowerCamelCase__		:    Optional[int]   =  [row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
            if len(_A						) > 0:
                  spiral_print_clockwise(_A						)
            else:
                  return
      else:
            print("Not a valid matrix"						)
            return

def 				lowercase_		(		_A      :   int						):

      """simple docstring"""




      if matrix:
            return list(matrix.pop(0						)						) + spiral_traversal(list(zip(*_A						)						)[::-1]						)
      else:
            return []


# driver code
if __name__ == "__main__":
    import doctest

    doctest.testmod()

    A				:   Dict		= [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
    spiral_print_clockwise(a)






from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

A				:   List[str]		= "https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true"

def 				lowercase_		(		_A      :   str   , _A      :   str						):

      """simple docstring"""




      try:
            # Has user provided both inputs?
            if not drug_name or not zip_code:
                  return None

            lowerCamelCase__		:    List[str]   =  BASE_URL.format(_A   , _A						)
            lowerCamelCase__		:    int   =  get(_A						)

            # Is the response ok?
            response.raise_for_status()

            # Scrape the data using bs4
            lowerCamelCase__		:    Dict   =  BeautifulSoup(response.text   , "html.parser"						)

            # This list will store the name and price.
            lowerCamelCase__		:    int   =  []

            # Fetch all the grids that contains the items.
            lowerCamelCase__		:    List[str]   =  soup.find_all("div"   , {"class": "grid-x pharmCard"}						)
            if grid_list and len(_A						) > 0:
                  for grid in grid_list:
                        # Get the pharmacy price.
                        lowerCamelCase__		:    Optional[int]   =  grid.find("p"   , {"class": "list-title"}						).text

                        # Get price of the drug.
                        lowerCamelCase__		:    Union[str, Any]   =  grid.find("span"   , {"p", "price price-large"}						).text

                        pharmacy_price_list.append(
                            {
                                "pharmacy_name": pharmacy_name,
                                "price": price,
                            }						)

            return pharmacy_price_list

      except (HTTPError, exceptions.RequestException, ValueError):
            return None


if __name__ == "__main__":
    # Enter a drug name and a zip code
    A				:   Any		= input("Enter drug name: ").strip()
    A				:   Union[str, Any]		= input("Enter zip code: ").strip()

    A				:   list | None		= fetch_pharmacy_and_price_list(
        drug_name, zip_code
    )

    if pharmacy_price_list:
        print(f'\nSearch results for {drug_name} at location {zip_code}:')
        for pharmacy_price in pharmacy_price_list:
            A				:   Dict		= pharmacy_price["pharmacy_name"]
            A				:   Optional[int]		= pharmacy_price["price"]

            print(f'Pharmacy: {name} Price: {price}')
    else:
        print(f'No results found for {drug_name}')


