Posts

Showing posts from January, 2018

Python Local & Global Variables

Image
   Concept Global variables are the ones that are defined and declared outside a function and we need to use them inside a function. Code Example 1: def foo(): total = 1           return total total = 0 print(foo()) >>> 1 Example 2: def fun():           print(s) s = "Hello World" fun() >>> Hello World Get Help

Python Keywords List

Image
  Code Example If someone ask you what are the keywords in python? chill man, Wait... No need to memorize anything for that, So how we can get all the keywords in python. Keywords  are the reserved words in  Python . We cannot use a  keyword  as a variable name, function name or any other identifier. They are used to define the syntax and structure of the  Python  language. In  Python ,  keywords  are case sensitive. There are 33  keywords in Python  3.7 Note** :   Python, keywords are case sensitive Create Python script or Paste the below code on IDLE, that's all  😉 import keyword print(keyword.kwlist) Output : ['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in

Print Method In Python

Image
  Code Example The  print()  function prints the specified message to the screen or other standard output device. The message can be a string or any other object, the object will be converted into a string before written to the screen. Example 1: >>> print("I Love Python") I Love Python Example 2: >>> print(1,2,3,4,5, sep='*') 1*2*3*4*5 Example 3: >>> print(1,2,3,4,5, sep='#', end='@') 1#2#3#4#5@ Get Help

Get Help

Image
  Here we will find some interesting Quiz, Contact, Feedback Form Below Test Your Knowledge and Get In Touch With Me Quiz Level 1:  Click Here Quiz Level 2:   Click Here Request Me Any Topic:  Click Here Contact Me:  Click Here Feedback:   Click Here