Indexing is a standard feature of most programming languages. Java, Python, C#,
C++, and C all have syntax like E[i] whereby an item with index i can be
reference in E (which might be a character string, an array of numbers etc).
Python goes further beyond, it is possible to refer to chunks of a sequence instead of
indexing items one at a time. This feature in python is called slicing a sequence. Other
techniques, like split and join, make it easy to take apart strings and assemble
lists of strings into a new strings .
In the same way that hand tools allow people to cut, shape, reshape, and put together
wood into furniture, slicing, split, and join operations form the “carpentry” of
Python’s text processing tasks. Even more powerful methods, notabe regular
expressions, could be likened to the power tools of text and string processing.
This post only covers the basic techniques, leaving regular expressions and
other more advance libraries of software as later topics to explore.
Working with slices particularly in Python’s syntax for slices, takes some getting
used to. With regular practice, it becomes easy to write expressions that take apart
sequences in creative ways and use operators to assemble slices into a new sequences. For strings slicing is only the beginning. String methods provide
ways to search, replace, trim and form new strings from sequences of strings. Following three methods are used to get the data in python via indexing 1 loc() Only for lables 2 iloc() only for integer 3 ix() for both label and and integer.
This post will explain the logic, code and Syntax for pattern program in Python Programming. In this post you will understand how to right the code of a pattern which have the sequence in descreasing and incresinng sequence.
Pattern Code-
def python_pattern(n):for i in range(0, n):if n/2 >= i:
for j in range(1, i+1):print(j, end=" ")print("\r")
else:
for j in range(1, n - i + 1):print(j, end=" ")print("\r")n=10python_pattern(n)
In this post i will explain the palindome number program in python and also to expalin the same i also created a youtube video so you can check also complete step by step and also output in IDE.
Palindrome number program in Pythan
Palindrome No Program in Python-
num = int(input("enter a number: "))
temp = num
rev = 0while temp:
rev = (rev * 10) + (temp % 10)
temp = temp // 10if num == rev:
print("No is palindrome")
else:
print("No is not palindrome")
As all of us knows that as we used to print the pattern program in C, JAVA,Net etc. To make comfortable and understand to the new user in Pyhton we started learning that programming language.
In the same way to make confidence, Comfortable and learn syntax and logic writing style in Python we can practice for this i am showing to all of you more than 20 pattern program code in Python.
You can copy and paste these code and even test at your own system. Users can modify these Codes too accrding to requirement.
In this post i will explain the palindome number program in python and also to expalin the same i also created a youtube video so you can check also complete step by step and also output in IDE.
This Blog post have the complete Code for an Android Application which have database at cload and running on apache TOMCAT.
In this blog post you can get all information easily which is required to send a request from android application to server(cloud) and receive and extract the data in usable format.
This Code is used in School ERP Application for uploading The Image of Code