# Python Basics ## Loop ### while ``` python count = 0 while (count < 4): print(count) count += 1 """ output: 0 1 2 3 """ ``` ### for loop ``` python fruits = ["apple", "banana", "orange"] for fruit in fruits: print(fruit) """ output: apple banana orange """ ``` ``` python for i in range (2, 4): for j in range (1, 5): pass print(i) """ output: 2 3 """ ``` ###### tags: `Python`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up