Python 3.13.6 (tags/v3.13.6:4e66535, Aug 6 2025, 14:36:00) [MSC v.1944 64 bit (AMD64)] on win32 Enter "help" below or click "Help" above for more information. import wikipedia print wikipedia.summary("Wikipedia") SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? print(wikipedia.summary("Wikipedia")) The Wikimedia Foundation, Inc. (WMF) is an American 501(c)(3) nonprofit organization headquartered in San Francisco, California, and registered there as a charitable foundation. It is the host of Wikipedia, the tenth most visited website in the world. It also hosts fourteen related open collaboration projects, and supports the development of MediaWiki, the wiki software which underpins them all. The foundation was established in 2003 in St. Petersburg, Florida by Jimmy Wales, as a non-profit way to fund Wikipedia and other wiki projects which had previously been hosted by Bomis, Wales' for-profit company. The Wikimedia Foundation provides the technical and organizational infrastructure to enable members of the public to develop wiki-based content in languages across the world. The foundation does not write or curate any of the content on the projects themselves. Instead, this is done by volunteer editors, such as the Wikipedians. However, it does collaborate with a network of individual volunteers and affiliated organizations, such as Wikimedia chapters, thematic organizations, user groups and other partners. The foundation finances itself mainly through millions of small donations from readers and editors, collected through email campaigns and annual fundraising banners placed on Wikipedia and its sister projects. These are complemented by grants from philanthropic organizations and tech companies, and starting in 2022, by services income from Wikimedia Enterprise. As of 2023, it has employed over 700 staff and contractors, with net assets of $255 million and an endowment which has surpassed $100 million. title = "University of Houston-Clear Lake" title 'University of Houston-Clear Lake' page = wikipedia.page(title, auto_suggest=False) print(f"Information about Wikipedia page on {title}") Information about Wikipedia page on University of Houston-Clear Lake summary = wikipedia.summary(title, sentences=3, auto_suggest=True) print(f"Information about Wikipedia page on {title}") Information about Wikipedia page on University of Houston-Clear Lake print(f"1. Page Title: {page.title}") 1. Page Title: University of Houston–Clear Lake print(f"2. Page URL: {page.url}") 2. Page URL: https://en.wikipedia.org/wiki/University_of_Houston%E2%80%93Clear_Lake title = "Golden Gate Bridge" page = wikipedia.page(title, auto_suggest=False) print(f"2. Page URL: {page.url}") 2. Page URL: https://en.wikipedia.org/wiki/Golden_Gate_Bridge page = wikipedia.page(title, auto_suggest=True) Traceback (most recent call last): File "", line 1, in page = wikipedia.page(title, auto_suggest=True) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 276, in page return WikipediaPage(title, redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__ self.__load(redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 345, in __load raise PageError(self.title) wikipedia.exceptions.PageError: Page id "golden state bridge" does not match any pages. Try another id! summary = wikipedia.summary(title, sentences=3, auto_suggest=False) summary 'The Golden Gate Bridge is a suspension bridge spanning the Golden Gate, the one-mile-wide (1.6 km) strait connecting San Francisco Bay and the Pacific Ocean in California, United States. The structure links San Francisco—the northern tip of the San Francisco Peninsula—to Marin County, carrying both U.S. Route 101 and California State Route 1 across the strait. It also carries pedestrian and bicycle traffic, and is designated as part of U.S. Bicycle Route 95.' summary = wikipedia.summary(title, sentences=3, auto_suggest=True) Traceback (most recent call last): File "", line 1, in summary = wikipedia.summary(title, sentences=3, auto_suggest=True) File "C:\Python\Python313\Lib\site-packages\wikipedia\util.py", line 28, in __call__ ret = self._cache[key] = self.fn(*args, **kwargs) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 231, in summary page_info = page(title, auto_suggest=auto_suggest, redirect=redirect) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 276, in page return WikipediaPage(title, redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__ self.__load(redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 345, in __load raise PageError(self.title) wikipedia.exceptions.PageError: Page id "golden state bridge" does not match any pages. Try another id! title = input("Please input a title of a Wikipedia page: ") Please input a title of a Wikipedia page: Golden Gate Bridge title 'Golden Gate Bridge' page = wikipedia.page(title, auto_suggest=True) Traceback (most recent call last): File "", line 1, in page = wikipedia.page(title, auto_suggest=True) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 276, in page return WikipediaPage(title, redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__ self.__load(redirect=redirect, preload=preload) File "C:\Python\Python313\Lib\site-packages\wikipedia\wikipedia.py", line 345, in __load raise PageError(self.title) wikipedia.exceptions.PageError: Page id "golden state bridge" does not match any pages. Try another id! page = wikipedia.page(title, auto_suggest=False) num_images = len(page.images) print(f"4. Number of Images: {num_images}") 4. Number of Images: 44 i = 32 i =9750943790572430570243750347507340573402570437504375042370943750374205703485702347503427503472502374507 i 9750943790572430570243750347507340573402570437504375042370943750374205703485702347503427503472502374507 min(-2,90,2,18) -2 >>> import sys >>> sys.getsizeof(1) 28 >>> sys.getsizeof(8783783748374838473847398478348937483748324932487394) 48 >>> i = 10 >>> id(i) 140706043491528 >>> sys.getsizeof(i) 28 >>> i = 'a quick brown fox jumps over a lazy dog in the future.' >>> id(i) 1496866815216 >>> sys.getsizeof(i) 95 >>> i = [1,2,3] >>> i [1, 2, 3] >>> sys.getsizeof(i) 88 >>> i = 1,2,3,4,5,6,7] SyntaxError: unmatched ']' >>> i = [1,2,3,4,5,6,7] >>> sys.getsizeof(i) 120 >>> id(i) 1496867269760