28.10.2021 Views

Python Tutorial ( PDFDrive )

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Syntax

Following is the syntax for isupper() method:

str.isupper()

Parameters

• NA

Return Value

This method returns true if all cased characters in the string are uppercase and there is at least one cased

character, false otherwise.

Example

The following example shows the usage of isupper() method.

#!/usr/bin/python

str = "THIS IS STRING EXAMPLE....WOW!!!";

print str.isupper();

str = "THIS is string example....wow!!!";

print str.isupper();

Let us compile and run the above program, this will produce the following result:

True

False

join(seq)

Description

The method join() returns a string in which the string elements of sequence have been joined by strseparator.

Syntax

Following is the syntax for join() method:

str.join(sequence)

Parameters

• sequence -- This is a sequence of the elements to be joined.

Return Value

This method returns a string, which is the concatenation of the strings in the sequence seq. The separator

between elements is the string providing this method.

Example

The following example shows the usage of join() method.

#!/usr/bin/python

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!