print === ```python print([i for i in range(4)]) ``` Output: `[0, 1, 2, 3]` ## Ref. [https://www.w3schools.com/python/python\_lists\_comprehension.asp](https://www.w3schools.com/python/python\_lists\_comprehension.asp) [https://www.runoob.com/python3/python-func-print.html](https://www.runoob.com/python3/python-func-print.html) [https://www.runoob.com/w3cnote/python3-print-func-b.html](https://www.runoob.com/w3cnote/python3-print-func-b.html) ###### tags: `語法相關`
×
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