How to Print Values in Python From a Particular Position in a Paragraph /String
Suppose "I like to play Cricket and i am fan of Dhoni" is a String and I want to print "Cricket and i am fan of Dhoni"
At first find the position of letter where to start print. so we can find the position of 'C' then this position store in a variable, and then use Selecting Sub Sequences method and print the line.
At first find the position of letter where to start print. so we can find the position of 'C' then this position store in a variable, and then use Selecting Sub Sequences method and print the line.
Program:
X = ("I like to play Cricket and i am fan of Dhoni")
y=(X.find('C'))
print(X[y:])
Output:
Cricket and i am fan of Dhoni
Let's see Computer screen
Input:
Output:
0 comments :
computer books list list of computer science books with authors best computer books for beginners fundamental of computer books pdf free download computer books for dummies best computer hardware books introduction to computer best computer books of all time
Powered by Blogger.
Menu Footer Widget
Followers
Search This Blog
Translate
Contact
Popular Posts
-
Software development life cycle sometime reffer to as system development life cycle and abbreviated as SDLC. A life cycle and abbreviated a...
-
Software is collection of data or computer instructions that tell the computer how to work. Examples of application software include off...
-
Suppose the program print "Hello" and Print "What is your name " then takes input from user and again print a line with...
Post a Comment