Sunday 22 October 2017

Python Interview Questions-3

1.Functions
def exp(x,y):
    z = x ** y
    print(z)

exp(1,2)

def printFib(n):
    a, b = 0,1
    while b < n:
        print(b)
        a, b = b, a+b
   
printFib(4)

def byValExample(x):
    x = "This value is overridden!"
    print(x)

byValExample(7)

2. Example of OOP
def calcCircumference(radius):
    return math.pi * 2 * radius

class Circle:
    pass

circle1 = Circle()

circle1.radius = 4.2

print(circle1.radius)

circle2 = Circle()
circle2.radius = 3.9
print(circle2.radius)

3. Inheritance
class Shape():
    def __init__(self):
        self.color = "Red"
        self.sides = 0

class Square(Shape):
    def __init__(self, w, c):
        Shape.__init__(self)
        self.width = w
        self.color = c

sq1 = Square(5, "Blue")
sq2 = Square(9, "Green")

print("Square Sizes:",sq1.width,"x",sq1.sides,sq1.color,
      ",",sq2.width,"x",sq2.sides,sq2.color)

words = "why sometimes i have believed as many six impossible things before".split()
print(words)

print([len(word) for word in words])

#from math import factorial
#f = [len(str(factorial(x))) for x in range(20)]
#print(f)

4.Example of dictionary comprehension
from pprint import pprint as pp
country_to_capital = {'United kingdom': 'London','Brazil': 'Brazilia','Morocco': 'Rabat','Sweden': 'Stockholm'}
pp(country_to_capital.items())
capital_to_country = {capital: country for country, capital in country_to_capital.items()}
pp(capital_to_country)

5. Filtering predicates
from math import sqrt
def is_prime(x):
    if x < 2:
        return False
    for i in range(2, int(sqrt(x)) + 1):
        if x % i == 0:
            return False
    return True

print([x for x in range(101) if is_prime(x)])

6. Generators. It is kind of iterator
def gen123():
    yield 1
    yield 2
    yield 3

g = gen123()
print(next(g))
print(next(g))
print(next(g))

def gen246():
    print("About to yield 2")
    yield 2
    print("About to yield 4")
    yield 4
    print("About to yield 6")
    yield 6
    print("About to return")

h = gen246()
print(next(h))
print(next(h))
print(next(h))


import sys
print(sys.getdefaultencoding())

7.Word count 
from urllib.request import urlopen

with urlopen('http://sixty-north.com/c/t.txt') as story:
    story_words = []
    for line in story:
        line_words = line.decode('utf-8').split()
        for word in line_words:
            story_words.append(word)
print(story_words)


8. How are the functions help() and dir() different?
These are the two functions that are accessible from the Python Interpreter. These two functions are used for viewing a consolidated dump of built-in functions.

help() - it will display the documentation string. It is used to see the help related to modules, keywords, attributes, etc.

 dir() - will display the defined symbols.
 Eg: >>>dir(str) – will only display the defined symbols.

>>> help(str)

>>> dir()
['__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__']
>>>

9. Explain Python's zip() function.?
zip() function- it will take multiple lists say list1, list2, etc and transform them into a single list of tuples by taking the corresponding elements of the lists that are passed as parameters. Eg:

>>> list1 = ['A',
... 'B','C']
>>> list2 = [10,20,30]
>>> list(zip(list1, list2))
[('A', 10), ('B', 20), ('C', 30)]
whenever the given lists are of different lengths, zip stops generating tuples when the first list ends.

10. Explain Python's pass by references Vs pass by value . (or) Explain about Python's parameter passing mechanism?
In Python, by default, all the parameters (arguments) are passed “by reference” to the functions. Thus, if you change the value of the parameter within a function, the change is reflected in the calling function.We can even observe the pass “by value” kind of a behaviour whenever we pass the arguments to functions that are of type say numbers, strings, tuples. This is because of the immutable nature of them.

11. As Everything in Python is an Object, Explain the characteristics of Python's Objects.
As Python’s Objects are instances of classes, they are created at the time of instantiation. Eg: object-name = class-name(arguments)
one or more variables can reference the same object in Python
Every object holds unique id and it can be obtained by using id() method. Eg: id(obj-name) will return unique id of the given object.
every object can be either mutable or immutable based on the type of data they hold.
Whenever an object is not being used in the code, it gets destroyed automatically garbage collected or destroyed
contents of objects can be converted into string representation using a method

12. Explain how to overload constructors or methods in Python.
Python’s constructor – _init__ () is a first method of a class. Whenever we try to instantiate a object __init__() is automatically invoked by python to initialize members of an object.

13. Which statement of Python is used whenever a statement is required syntactically but the program needs no action?
Pass – is no-operation / action statement in Python
If we want to load a module or open a file, and even if the requested module/file does not exist, we want to continue with other tasks. In such a scenario, use try-except block with pass statement in the except block.
Eg:
 try:import mymodulemyfile = open(“C:\myfile.csv”)except:pass

14. Explain the use of with
In python generally “with” statement is used to open a file, process the data present in the file, and also to close the file without calling a close() method. “with” statement makes the exception handling simpler by providing cleanup activities.
General form of with:
with open(“file name”, “mode”) as file-var:
processing statements
note: no need to close the file by calling close() upon file-var.close()

15. Explain all the file processing modes supported by Python ?
Python allows you to open files in one of the three modes. They are:
read-only mode, write-only mode, read-write mode, and append mode by specifying the flags “r”, “w”, “rw”, “a” respectively.
A text file can be opened in any one of the above said modes by specifying the option “t” along with
“r”, “w”, “rw”, and “a”, so that the preceding modes become “rt”, “wt”, “rwt”, and “at”.A binary file can be opened in any one of the above said modes by specifying the option “b” along with “r”, “w”, “rw”, and “a” so that the preceding modes become “rb”, “wb”, “rwb”, “ab”.

16. When does a dictionary is used instead of a list?

Dictionaries – are best suited when the data is labelled, i.e., the data is a record with field names.
lists – are better option to store collections of un-labelled items say all the files and sub directories in a folder.
Generally Search operation on dictionary object is faster than searching a list object.

17. What is the use of enumerate() in Python?
Using enumerate() function you can iterate through the sequence and retrieve the index position and its corresponding value at the same time.
>>> for i,v in enumerate([‘Python’,’Java’,’C++’]):
print(i,v)
0 Python
1 Java
2 C++

18. How many kinds of sequences are supported by Python? What are they?
Python supports 7 sequence types. They are str, list, tuple, unicode, bytearray, xrange, and buffer. where xrange is deprecated in python 3.5.X.

19. Name few methods for matching and searching the occurrences of a pattern in a given text String ?
There are 4 different methods in “re” module to perform pattern matching. They are:
match() – matches the pattern only to the beginning of the String. search() – scan the string and look for a location the pattern matches findall() – finds all the occurrences of match and return them as a list
finditer() – finds all the occurrences of match and return them as an iterator.

20. Explain split(), sub(), subn() methods of
To modify the strings, Python’s “re” module is providing 3 methods. They are:
split() – uses a regex pattern to “split” a given string into a list.
sub() – finds all substrings where the regex pattern matches and then replace them with a different string
subn() – it is similar to sub() and also returns the new string along with the no. of
replacements.

21. How to display the contents of text file in reverse order?
convert the given file into a list.
 reverse the list by using reversed()
Eg: for line in reversed(list(open(“file-name”,”r”))):
print(line)

22. What is TkInter?
TkInter is Python library. It is a toolkit for GUI development. It provides support for various GUI tools or widgets (such as buttons, labels, text boxes, radio buttons, etc) that are used in GUI applications. The common attributes of them include Dimensions, Colors, Fonts, Cursors, etc.

23. What is a Class? How do you create it in Python?
A class is a blue print/ template of code /collection of objects that has same set of attributes and behaviour. To create a class use the keyword class followed by class name beginning with an uppercase letter. For example, a person belongs to class called Person class and can have the attributes (say first-name and last-name) and behaviours / methods (say showFullName()). A Person class can be defined as:
class Person():
#method
def inputName(self,fname,lname): self.fname=fname self.lastname=lastname
#method
def showFullName() (self):
print(self.fname+" "+self.lname)person1 = Person() #object instantiation person1.inputName("Ratan","Tata") #calling a method inputName person1. showFullName() #calling a method showFullName()
Note: whenever you define a method inside a class, the first argument to the method must be self (where self – is a pointer to the class instance). self must be passed as an argument to the method, though the method does not take any arguments

24. Explain Inheritance in Python with an example.
Inheritance allows One class to gain all the members(say attributes and methods) of another class. Inheritance provides code reusability, makes it easier to create and maintain an application. They are different types of inheritance supported by Python. They are: single, multi-level, hierarchical and multiple inheritance. The class from which we are inheriting is called super-class and the class that is inherited is called a derived / child class.
Single Inheritance – where a derived class acquires the members of a single super class.
multi-level inheritance – a derived class d1 in inherited from base class base1, and d2 is inherited from base2.
hierarchical inheritance – from one base class you can inherit any number of child classes
multiple inheritance – a derived class is inherited from more than one base class.
ex:
class ParentClass:
v1 = "from ParentClass - v1"
v2 = "from ParentClass - v2"class ChildClass(ParentClass):
passc = ChildClass() print(c.v1) print(c.v2)

25. How instance variables are different from class variables?
Instance variables: are the variables in an object that have values that are local to that object. Two objects of the same class maintain distinct values for their variables. These variables are accessed with “object-name.instancevariable-name”.

class variables: these are the variables of class. All the objects of the same class will share value of “Class variables. They are accessed with their class name alone as “class- name.classvariable-name”. If you change the value of a class variable in one object, its new value is visible among all other objects of the same class. In the Java world, a variable that is declared as static is a class variable.

26. How is Inheritance and Overriding methods are related?
If class A is a sub class of class B, then everything in B is accessible in /by class A. In addition, class A can define methods that are unavailable in B, and also it is able to override methods in B. For Instance, If class B and class A both contain a method called func(), then func() in class B can override func() in class A. Similarly, a method of class A can call another method defined in A that can invoke a method of B that overrides it.

27. Differentiate between append() and extend() methods. ?
Both append() and extend() methods are the methods of list. These methods a re used to add the elements at the end of the list.
append(element) – adds the given element at the end of the list which has called this method.
extend(another-list) – adds the elements of another-list at the end of the list which is called the extend method.

28. Looking at the below code, write down the final values of A0, A1, ...An.
A0 = dict(zip(('a','b','c','d','e'),(1,2,3,4,5)))
A1 = range(10)
A2 = sorted([i for i in A1 if i in A0])
A3 = sorted([A0[s] for s in A0])
A4 = [i for i in A1 if i in A3]
A5 = {i:i*i for i in A1}
A6 = [[i,i*i] for i in A1]

Answer
A0 = {'a': 1, 'c': 3, 'b': 2, 'e': 5, 'd': 4}  # the order may vary
A1 = range(0, 10) # or [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] in python 2
A2 = []
A3 = [1, 2, 3, 4, 5]
A4 = [1, 2, 3, 4, 5]
A5 = {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81}
A6 = [[0, 0], [1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6, 36], [7, 49], [8, 64], [9, 81]]

29.What does this code output:
def f(x,l=[]):
    for i in range(x):
        l.append(i*i)
    print(l)

f(2)
f(3,[3,2,1])
f(3)

Answer
[0, 1]
[3, 2, 1, 0, 1, 4]
[0, 1, 0, 1, 4]

Hint
The first function call should be fairly obvious, the loop appends 0 and then 1 to the empty list, l. l is a name for a variable that points to a list stored in memory. The second call starts off by creating a new list in a new block of memory. l then refers to this new list. It then appends 0, 1 and 4 to this new list. So that's great. The third function call is the weird one. It uses the original list stored in the original memory block. That is why it starts off with 0 and 1.

Try this out if you don't understand:

l_mem = []

l = l_mem           # the first call
for i in range(2):
    l.append(i*i)

print(l)            # [0, 1]

l = [3,2,1]         # the second call
for i in range(3):
    l.append(i*i)

print(l)            # [3, 2, 1, 0, 1, 4]

l = l_mem           # the third call
for i in range(3):
    l.append(i*i)

print(l)            # [0, 1, 0, 1, 4]

30. What does this stuff mean: *args, **kwargs? And why would we use it?
Answer
Use *args when we aren't sure how many arguments are going to be passed to a function, or if we want to pass a stored list or tuple of arguments to a function. **kwargs is used when we dont know how many keyword arguments will be passed to a function, or it can be used to pass the values of a dictionary as keyword arguments.

Here is a little illustration:

def f(*args,**kwargs): print(args, kwargs)

l = [1,2,3]
t = (4,5,6)
d = {'a':7,'b':8,'c':9}

f()
f(1,2,3)                    # (1, 2, 3) {}
f(1,2,3,"groovy")           # (1, 2, 3, 'groovy') {}
f(a=1,b=2,c=3)              # () {'a': 1, 'c': 3, 'b': 2}
f(a=1,b=2,c=3,zzz="hi")     # () {'a': 1, 'c': 3, 'b': 2, 'zzz': 'hi'}
f(1,2,3,a=1,b=2,c=3)        # (1, 2, 3) {'a': 1, 'c': 3, 'b': 2}

f(*l,**d)                   # (1, 2, 3) {'a': 7, 'c': 9, 'b': 8}
f(*t,**d)                   # (4, 5, 6) {'a': 7, 'c': 9, 'b': 8}
f(1,2,*t)                   # (1, 2, 4, 5, 6) {}
f(q="winning",**d)          # () {'a': 7, 'q': 'winning', 'c': 9, 'b': 8}
f(1,2,*t,q="winning",**d)   # (1, 2, 4, 5, 6) {'a': 7, 'q': 'winning', 'c': 9, 'b': 8}

def f2(arg1,arg2,*args,**kwargs): print(arg1,arg2, args, kwargs)

f2(1,2,3)                       # 1 2 (3,) {}
f2(1,2,3,"groovy")              # 1 2 (3, 'groovy') {}
f2(arg1=1,arg2=2,c=3)           # 1 2 () {'c': 3}
f2(arg1=1,arg2=2,c=3,zzz="hi")  # 1 2 () {'c': 3, 'zzz': 'hi'}
f2(1,2,3,a=1,b=2,c=3)           # 1 2 (3,) {'a': 1, 'c': 3, 'b': 2}

f2(*l,**d)                   # 1 2 (3,) {'a': 7, 'c': 9, 'b': 8}
f2(*t,**d)                   # 4 5 (6,) {'a': 7, 'c': 9, 'b': 8}
f2(1,2,*t)                   # 1 2 (4, 5, 6) {}
f2(1,1,q="winning",**d)      # 1 1 () {'a': 7, 'q': 'winning', 'c': 9, 'b': 8}
f2(1,2,*t,q="winning",**d)   # 1 2 (4, 5, 6) {'a': 7, 'q': 'winning', 'c': 9, 'b': 8}

31. What do these mean to you: @classmethod, @staticmethod, @property?
These are decorators. A decorator is a special kind of function that either takes a function and returns a function, or takes a class and returns a class. The @ symbol is just syntactic sugar that allows you to decorate something in a way that's easy to read.

@my_decorator
def my_func(stuff):
    do_things

Is equivalent to

def my_func(stuff):
    do_things

my_func = my_decorator(my_func)

32. Consider the following code, what will it output?
class A(object):
    def go(self):
        print("go A go!")
    def stop(self):
        print("stop A stop!")
    def pause(self):
        raise Exception("Not Implemented")

class B(A):
    def go(self):
        super(B, self).go()
        print("go B go!")

class C(A):
    def go(self):
        super(C, self).go()
        print("go C go!")
    def stop(self):
        super(C, self).stop()
        print("stop C stop!")

class D(B,C):
    def go(self):
        super(D, self).go()
        print("go D go!")
    def stop(self):
        super(D, self).stop()
        print("stop D stop!")
    def pause(self):
        print("wait D wait!")

class E(B,C): pass

a = A()
b = B()
c = C()
d = D()
e = E()

# specify output from here onwards

a.go()
b.go()
c.go()
d.go()
e.go()

a.stop()
b.stop()
c.stop()
d.stop()
e.stop()

a.pause()
b.pause()
c.pause()
d.pause()
e.pause()

Answer

The output is specified in the comments in the segment below:

a.go()
# go A go!

b.go()
# go A go!
# go B go!

c.go()
# go A go!
# go C go!

d.go()
# go A go!
# go C go!
# go B go!
# go D go!

e.go()
# go A go!
# go C go!
# go B go!

a.stop()
# stop A stop!

b.stop()
# stop A stop!

c.stop()
# stop A stop!
# stop C stop!

d.stop()
# stop A stop!
# stop C stop!
# stop D stop!

e.stop()
# stop A stop!

a.pause()
# ... Exception: Not Implemented

b.pause()
# ... Exception: Not Implemented

c.pause()
# ... Exception: Not Implemented

d.pause()
# wait D wait!

e.pause()
# ...Exception: Not Implemented

33. What is lambda in Python?
It is a single expression anonymous function often used as inline function.

34. In Python what is slicing?
A mechanism to select a range of items from sequence types like list, tuple, strings etc. is known as slicing.

35. What are generators in Python?
The way of implementing iterators are known as generators.  It is a normal function except that it yields expression in the function.

36. What is docstring in Python?
A Python documentation string is known as docstring, it is a way of documenting Python functions, modules and classes.

37. How can you copy an object in Python?

To copy an object in Python, you can try copy.copy () or copy.deepcopy() for the general case. You cannot copy all objects but most of them.

38. What is the difference between Xrange and range?
Xrange returns the xrange object while range returns the list, and uses the same memory and no matter what the range size is.

39. What will be the output of the code below? 
def extendList(val, list=[]):
 list.append(val)
 return list

list1 = extendList(10)
list2 = extendList(123,[])
list3 = extendList('a')

print ("list1 = %s" % list1)
print ("list2 = %s" % list2)
print ("list3 = %s" % list3)

'''
Output:

list1 = [10, 'a']
list2 = [123]
list3 = [10, 'a']
'''

40. What will be the output of the code below? 

def multipliers():
  return [lambda x : i * x for i in range(4)]

print ([m(2) for m in multipliers()])

'''
The output of the above code will be [6, 6, 6, 6] (not [0, 2, 4, 6]).
'''

41. What will be the output of the code below? 

class Parent(object):
    x = 1

class Child1(Parent):
    pass

class Child2(Parent):
    pass

print (Parent.x, Child1.x, Child2.x)
Child1.x = 2
print (Parent.x, Child1.x, Child2.x)
Parent.x = 3
print (Parent.x, Child1.x, Child2.x)

'''
The output of the above code will be:

1 1 1
1 2 1
3 2 3
'''

42. What will be the output of the code below in Python
def div1(x,y):
    print ("%s/%s = %s" % (x, y, x/y))

def div2(x,y):
    print ("%s//%s = %s" % (x, y, x//y))

div1(5,2)
div1(5.,2)
div2(5,2)
div2(5.,2.)

'''
5/2 = 2.5
5.0/2 = 2.5
5//2 = 2
5.0//2.0 = 2.0
'''

43.What will be the output of the code below?

list = ['a', 'b', 'c', 'd', 'e']
print (list[10:])

'''
The above code will output []
'''

44. What will be the output of lines ?
list = [ [ ] ] * 5
print(list)
list[0].append(10)
print(list)
list[1].append(20)
print(list)
list.append(30)
print(list)

'''
The output will be as follows:

[[], [], [], [], []]
[[10], [10], [10], [10], [10]]
[[10, 20], [10, 20], [10, 20], [10, 20], [10, 20]]
[[10, 20], [10, 20], [10, 20], [10, 20], [10, 20], 30]
'''

'''
45.Given a list of N numbers, use a single list comprehension to produce a new list that only contains those values that are:
(a) even numbers, and
(b) from elements in the original list that had even indices

'''

list = [ 1 , 3 , 5 , 8 , 10 , 13 , 18 , 36 , 78 ]
print([x for x in list[::2] if x%2 == 0])

'''
Output is : [10, 18, 78]
'''

46. Name five modules that are included in python by default ?
datetime           (used to manipulate date and time)
re                         (regular expressions)
urllib, urllib2  (handles many HTTP things)
string                  (a collection of different groups of strings for example all lower_case letters etc)
itertools            (permutations, combinations and other useful iterables)
ctypes                (from python docs: create and manipulate C data types in Python)
email                  (from python docs: A package for parsing, handling, and generating email messages)

47. What is a docstring?
docstring is the documentation string for a function. It can be accessed by

function_name.__doc__

it is declared as:
def function_name():
"""your docstring"""
Writing documentation for your progams is a good habit and makes the code more understandable and reusable.

48. What is list comprehension?
Creating a list by doing some operation over data that can be accessed using an iterator. For eg:
>>>[ord(i) for i in string.ascii_uppercase]
     [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90]
 >>>

49.What would the following code yield?
word = 'abcdefghij'
print word[:3] + word[3:]
Ans: ‘abcdefghij’ will be printed.
This is called string slicing. Since here the indices of the two slices are colliding, the string slices are ‘abc’ and ‘defghij’. The ‘+’ operator on strings concatenates them. Thus, the two slices formed are concatenated to give the answer ‘abcdefghij’.

50. Optimize these statements as a python programmer.
word = 'word'
print word.__len__()
Ans:

word = 'word'
print(len(word))

51. Write a program to print all the contents of a file
try:
    with open('sample.py','r') as f:
        print (f.read())
except IOError:
    print ("no such file exists")

Print the length of each line in the file ‘file.txt’ not including any whitespaces at the end of the lines.
with open("sample.py", "r") as f1:
  print(len(f1.readline().rstrip()))

rstrip() is an inbuilt function which strips the string from the right end of spaces or tabs (whitespace characters).

52. Print the sum of digits of numbers starting from 1 to 100 (inclusive of both)
print sum(range(1,101))
range() returns a list to the sum function containing all the numbers from 1 to 100. Please see that the range function does not include the end given (101 here).

53. Create a new list that converts the following list of number strings to a list of numbers.
>>> num_strings = ['1','21','53','84','50','66','7','38','9']
>>> [int(i) for i in num_strings]
[1, 21, 53, 84, 50, 66, 7, 38, 9]

54. Create two new lists one with odd numbers and other with even numbers
num_strings = [1,21,53,84,50,66,7,38,9]
>>> even = [i for i in num_strings if i%2==0]
>>> print(even)
[84, 50, 66, 38]
>>> odd = [i for i in num_strings if i%2==1]
>>> print(odd)
[1, 21, 53, 7, 9]

55.The following code is supposed to remove numbers less than 5 from list n, but there is a bug. Fix the bug.
n = [1,2,5,10,3,100,9,24]
for e in n:
  if e<5: p="">    n.remove(e)
  print n

## after e is removed, the index position gets disturbed. Instead it should be:
a=[]
for e in n:
  if e >= 5:
    a.append(e)
n = a

OR again a list comprehension
print([i for i in n if i >= 5])


56. What will be the output of the following
def func(x,*y,**z):
....    print z

func(1,2,3)

Here the output is :

{}  #Empty Dictionay

x is a normal value, so it takes 1..
y is a list of numbers, so it takes 2,3..
z wants named parameters, so it can not take any value here.
Thus the given answer.

57. Write a program to swap two numbers.
a = 5
b = 9
>>> a = 5
>>> b = 4
>>> a,b = b,a
>>> print(a)
4
>>> print(b)
5

58. What will be the output of the following code
class C(object):
....    def__init__(self):
....        self.x =1

c=C()
print c.x
print c.x
print c.x
print c.x
Ans.

All the outputs will be 1, since the value of the the object’s attribute(x) is never changed.

1
1
1
1

x is now a part of the public members of the class C.
Thus it can be accessed directly

59. What all options will work?
a.
n = 1
print n++   ## no such operator in python (++)

b.
n = 1
print ++n   ## no such operator in python (++)

c.
n = 1
print n += 1  ## will work

d.
int n = 1
print n = n+1 ##will not work as assignment can not be done in print command like this

e.
n =1
n = n+1      ## will work

60. Remove the whitespaces from the string.
s = ‘aaa bbb ccc ddd eee’
''.join(s.split())

61. What does the below mean?
s = a + ‘[‘ + b + ‘:’ + c + ‘]’
seems like a string is being concatenated. Nothing much can be said without knowing types of variables a, b, c. Also, if all of the a, b, c are not of type string, TypeError would be raised. This is because of the string constants (‘[‘ , ‘]’) used in the statement.

13 comments:

  1. Merhaba,

    Muchas Gracias Mi Amigo! You make learning so effortless. Anyone can follow you and I would not mind following you to the moon coz I know you are like my north star.

    I have this problem.I need to submit 20 words separated by a comma to a web service.The words i am getting them from mysql database. I am new to python.
    Is there a data structure that i can use to do the following:

    1. I have 1000 records in mysql table

    2. I want to use python to select and display 20 records at a time and if the records dont number 20, just display whatever is there.

    Follow my new blog if you interested in just tag along me in any social media platforms!

    Kind Regards,
    Irene Hynes

    ReplyDelete
  2. Many organizations are using Python these days to perform major tasks. The businesses are working on python skills and experience of the programmers that allows them to achieve a lot more. There is a better career opportunity when it comes to python as well as salary scope.
    Python course in pune
    Python classes in pune
    python certification in pune
    python course fees in pune

    ReplyDelete
  3. I have really happy to these reading your post. This product control and maintenance of our health.The daily routine can assist you weight lose quickly and safely.My life is completely reworked once I followed this diet.I feeling nice concerning myself.Really very informative and creative contents. This concept is a good way to enhance the knowledge.thanks for sharing.
    please keep it up.Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  4. It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips.highly informative and professionally written and I am glad to be a visitor of this perfect blog, thank you
    selenium training in chennai

    selenium training in chennai

    selenium online training in chennai

    software testing training in chennai

    selenium training in bangalore

    selenium training in hyderabad

    selenium training in coimbatore

    selenium online training

    selenium training

    ReplyDelete

  5. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge

    Azure Training in Chennai

    Azure Training in Bangalore

    Azure Training in Hyderabad

    Azure Training in Pune

    Azure Training | microsoft azure certification | Azure Online Training Course

    Azure Online Training

    ReplyDelete
  6. I have really happy to these reading your post. This product control and maintenance of our health.The daily routine can assist you weight lose quickly and safely.My life is completely reworked once I followed this diet.I feeling nice concerning myself.Really very informative and creative contents. This concept is a good way to enhance the knowledge.thanks for sharing.

    angular js training in chennai

    angular training in chennai

    angular js online training in chennai

    angular js training in bangalore

    angular js training in hyderabad

    angular js training in coimbatore

    angular js training

    angular js online training

    ReplyDelete
  7. Thank you for your informative article, I have been doing research on this subject, and for three days I keep entering sites that are supposed to have what I am searching for, only to be discouraged with the lack of what I needed. Thank you again.
    DevOps Training in Chennai

    DevOps Online Training in Chennai

    DevOps Training in Bangalore

    DevOps Training in Hyderabad

    DevOps Training in Coimbatore

    DevOps Training

    DevOps Online Training

    ReplyDelete
  8. I feel really happy to have seen your webpage.I am feeling grateful to read this.you gave a nice information for us.please updating more stuff content...thanks lot!!

    Android Training in Chennai

    Android Online Training in Chennai

    Android Training in Bangalore

    Android Training in Hyderabad

    Android Training in Coimbatore

    Android Training

    Android Online Training

    ReplyDelete
  9. I believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates.This is a wonderful article, Given so much info in it, Thanks for sharing.

    IELTS Coaching in chennai

    German Classes in Chennai

    GRE Coaching Classes in Chennai

    TOEFL Coaching in Chennai

    spoken english classes in chennai | Communication training


    ReplyDelete
  10. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog.
    acte reviews

    acte velachery reviews

    acte tambaram reviews

    acte anna nagar reviews

    acte porur reviews

    acte omr reviews

    acte chennai reviews

    acte student reviews

    ReplyDelete

Note: only a member of this blog may post a comment.