0% found this document useful (0 votes)
40 views2 pages

Python Programming Basics Guide

The document contains Python code examples demonstrating string manipulation methods such as endswith, capitalize, replace, find, and count. It also shows how to get the length of a string using the len function. The examples illustrate basic input and output operations in Python 3.2.2.

Uploaded by

sandeshdube77
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Python Programming Basics Guide

The document contains Python code examples demonstrating string manipulation methods such as endswith, capitalize, replace, find, and count. It also shows how to get the length of a string using the len function. The examples illustrate basic input and output operations in Python 3.2.2.

Uploaded by

sandeshdube77
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.

1500 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> str="i am a coder"

>>> print([Link]("er."))

False

>>> print([Link]("er"))

True

>>>

>>> str="i am a coder"

>>> print([Link]())

I am a coder

>>>

>>> str="i am a coder"

>>> print([Link]("coder", "Programmer"))

i am a Programmer

>>>

>>> str="i am a coder"

>>> print([Link]("o"))

>>>

>>> str="i am a coder"

>>> print([Link]("coder"))

>>>

>>> str="i am a coder"


>>> print([Link]("a"))

>>>

>>> Name="Enter your Name : "

>>> print("Length ofyour name is", len(Name))

Length ofyour name is 18

>>>

>>> Name=input("Enter your Name : ")

Enter your Name : Sandesh

>>> print("length of yourname is", len(Name))

length of yourname is 7

>>>

>>>

You might also like