Skip to content

Instantly share code, notes, and snippets.

@enseitankad0
Last active February 28, 2018 13:19
Show Gist options
  • Save enseitankad0/19b5acd9aa6197bf5618b0e5df5d57e5 to your computer and use it in GitHub Desktop.
Save enseitankad0/19b5acd9aa6197bf5618b0e5df5d57e5 to your computer and use it in GitHub Desktop.
#my very basics in python
print("Hello world for first time");
type(2) # return data type
#setting value for variables
a = b = c = 1.5
print(a)
print(b)
print(c)
#different method
one, two, three = 1, 'two', 3.0
print(one)
# type(one) = <int>
import keyword
print(keyword.kwlist)
#['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif',
#['else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or',
# 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']
#cleaning screen working in console
#
# import os
# clear = lambda: os.system('cls')
# clear()
#creating multiline comment ctrl and /
# asdasdsad
# asdas
# asdasd
# asdasdasdas
#manipuilating numbers in python
a=5/2
print(a) # 2.5
a=5//2
print(a) # 2
b = 2.0 + 5
print(b) #result will be 7.0
b = 2 + 5 #result will be 7 without .0
print(b)
c=3**3 #=27
print(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment