Skip to content

Instantly share code, notes, and snippets.

@hclpandv
Last active December 29, 2017 07:01
Show Gist options
  • Select an option

  • Save hclpandv/93e712834faf8d08ff2dad0c647ca522 to your computer and use it in GitHub Desktop.

Select an option

Save hclpandv/93e712834faf8d08ff2dad0c647ca522 to your computer and use it in GitHub Desktop.
Python Tutorial : Essentials
#!/usr/bin/python3
print("Hello World!")
user_name = input("Please Enter Your User Name: ")
print("User Name Entered is " + user_name)
#!/usr/bin/python3
a, b = 0, 1
if a < b:
print('a ({}) is less than b ({})'.format(a, b))
#Code Blocks are called as "Suit" in Python and Python Ineterpreter Looks after ":" and
#requires a consitant Indenting.
#Remember : whitespaces are important and Python is case sensitive.
else:
print('a ({}) is Not less than b ({})'.format(a, b))
# Python Expressions may also contain conditions. example below
print("Linux" if a < b else "Windows")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment