





'''simple docstring'''




import requests

lowercase__       : List[Any]         =       '''https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey='''






def 			_lowerCAmelCase     (    __snake_case    :					str     )	->	None:
     # fetching a list of articles in json format
     __A		:					Union[str, Any]						=			requests.get(_NEWS_API + bbc_news_api_key     ).json()
     # each article in the list is a dict
     for i, article in enumerate(bbc_news_page['articles']					,				1     ):
          print(f'{i}.) {article["title"]}'     )


if __name__ == "__main__":
  fetch_bbc_news(bbc_news_api_key='''<Your BBC News API key goes here>''')





"""simple docstring"""




from collections.abc import Sequence



def        a__					(							snake_case__			,					snake_case__ = False							)		->   float:
			if not arr:
						return 0

			lowerCamelCase      =   0 if allow_empty_subarrays else float("""-inf"""							)
			lowerCamelCase      =   0.0
			for num in arr:
						lowerCamelCase      =   max(0 if allow_empty_subarrays else num			,					curr_sum + num							)
						lowerCamelCase      =   max(snake_case__			,					snake_case__							)

			return max_sum


if __name__ == "__main__":
					from doctest import testmod

					testmod()

					lowerCAmelCase				:     Union[str, Any]					=				[-2, 1, -3, 4, -1, 2, 1, -5, 4]
					print(F"""{max_subarray_sum(nums) = }""")



