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.

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 :

Post a Comment

Cancel Reply

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.

Followers

Search This Blog

Translate