FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python/basics/while_example.py at optimization · examplehub/Python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
examplehub
/
Python
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
12
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Python
/
basics
/
while_example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (17 loc) · 313 Bytes
Breadcrumbs
Python
/
basics
/
while_example.py
Copy path
File metadata and controls
22 lines (17 loc) · 313 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
def
main
():
"""
While example.
>>> i = 1
>>> while i <= 5:
... print(i, end='')
... i += 1
12345
>>> i = 5
>>> while i >= 1:
... print(i, end='')
... i -= 1
54321
"""
if
__name__
==
"__main__"
:
from
doctest
import
testmod
testmod
()
Back
|
FazBrowse Home
|
New Git URL