Last active
July 24, 2019 19:50
-
-
Save tasfik007/8f6189a810be6e9b8ff5c90c4822c313 to your computer and use it in GitHub Desktop.
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
################ method 1 ################## | |
import os | |
os.system('cls') # prints 0 | |
tmp=os.system('cls') # avoids 0 | |
############################################ | |
################ method 2 ################## | |
import subprocess as sp | |
sp.call('cls',shell=True) # prints 0 | |
tmp=sp.call('cls',shell=True) # avoids 0 | |
############################################ |
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
print('Hello World!!') | |
print(12) | |
print("Tasfik Rahman") | |
print('Tasfik '+'Rahman') | |
##### print without new line ##### | |
print('Tasfik Rahman',end='') | |
print('prints newline at the end') | |
# same as | |
print('prints newline at the end',end='\n') |
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
# Python Snippets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment