Title: Python while
Open Graph Title: Python while
Description: In this tutorial, you'll learn about the Python while statement and how to use it to run a code block as long as a condition is true.
Open Graph Description: In this tutorial, you'll learn about the Python while statement and how to use it to run a code block as long as a condition is true.
Opengraph URL: https://www.pythontutorial.net/python-basics/python-while/
Generator: WordPress 6.9
Domain: www.pythontutorial.net
{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://www.pythontutorial.net/python-basics/python-while/","url":"https://www.pythontutorial.net/python-basics/python-while/","name":"Python while","isPartOf":{"@id":"https://www.pythontutorial.net/#website"},"primaryImageOfPage":{"@id":"https://www.pythontutorial.net/python-basics/python-while/#primaryimage"},"image":{"@id":"https://www.pythontutorial.net/python-basics/python-while/#primaryimage"},"thumbnailUrl":"https://www.pythontutorial.net/wp-content/uploads/2020/10/Python-while-loop.png","datePublished":"2020-10-03T01:27:12+00:00","dateModified":"2025-03-26T10:20:17+00:00","description":"In this tutorial, you'll learn about the Python while statement and how to use it to run a code block as long as a condition is true.","breadcrumb":{"@id":"https://www.pythontutorial.net/python-basics/python-while/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://www.pythontutorial.net/python-basics/python-while/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https://www.pythontutorial.net/python-basics/python-while/#primaryimage","url":"https://www.pythontutorial.net/wp-content/uploads/2020/10/Python-while-loop.png","contentUrl":"https://www.pythontutorial.net/wp-content/uploads/2020/10/Python-while-loop.png","width":287,"height":521},{"@type":"BreadcrumbList","@id":"https://www.pythontutorial.net/python-basics/python-while/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.pythontutorial.net/"},{"@type":"ListItem","position":2,"name":"Python Basics","item":"https://www.pythontutorial.net/python-basics/"},{"@type":"ListItem","position":3,"name":"Python while"}]},{"@type":"WebSite","@id":"https://www.pythontutorial.net/#website","url":"https://www.pythontutorial.net/","name":"Python Tutorial","description":"Master Python Programming For Beginners from Scratch","publisher":{"@id":"https://www.pythontutorial.net/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.pythontutorial.net/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https://www.pythontutorial.net/#organization","name":"Python Tutorial","url":"https://www.pythontutorial.net/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https://www.pythontutorial.net/#/schema/logo/image/","url":"https://www.pythontutorial.net/wp-content/uploads/2020/09/favicon.png","contentUrl":"https://www.pythontutorial.net/wp-content/uploads/2020/09/favicon.png","width":512,"height":512,"caption":"Python Tutorial"},"image":{"@id":"https://www.pythontutorial.net/#/schema/logo/image/"}}]}
| og:locale | en_US |
| og:type | article |
| og:site_name | Python Tutorial |
| article:modified_time | 2025-03-26T10:20:17+00:00 |
| og:image | https://www.pythontutorial.net/wp-content/uploads/2020/10/Python-while-loop.png |
| og:image:width | 287 |
| og:image:height | 521 |
| og:image:type | image/png |
| twitter:card | summary_large_image |
| twitter:label1 | Est. reading time |
| twitter:data1 | 2 minutes |
| msapplication-TileImage | https://www.pythontutorial.net/wp-content/uploads/2020/09/cropped-favicon-270x270.png |
Links:
Viewport: width=device-width, initial-scale=1
Robots: index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1