notes and code snippets
Last active
May 11, 2020 12:14
-
-
Save mezcel/fa9f298a0e02ff8f7afa02b05f2804f8 to your computer and use it in GitHub Desktop.
python notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## win10 line endins | |
| *.bat eol=crlf | |
| *.ps1 eol=crlf | |
| ## Linux/Posix line endins | |
| *.sh eol=lf | |
| Makefile eol=lf |
while loop
count = 0
while ( count < 3 ):
count = count + 1
print(count)
else:
print("other than count is less than 3")for loop
n = 3
for i in range(0, n+1):
print(i)
arr=["hello", "world", "hello world"]
for i in arr:
print(i)use python to navigate the file system
import os
import subprocess
currdir = os.getcwd()
print(currdir)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment