YouTip LogoYouTip

Att String Min

Python min() Method | Tutorial

Tutorial -- Learning not just technology, but dreams!

Python Basic Tutorial

Python Basic Tutorial Python Introduction Python Environment Setup Python Chinese Encoding Python VS Code Python Basic Syntax Python Variable Types Python Operators Python Conditional Statements Python Loops Python While Loop Python for Loop Python Nested Loops Python break Statement Python continue Statement Python pass Statement Python Number Python Strings Python Lists Python Tuples Python Dictionary Python Date and Time Python Functions Python Modules Python File I/O Python File Methods Python Exceptions Python OS File/Directory Methods Python Built-in Functions

Python Advanced Tutorial

Python Object-Oriented Python Regular Expressions Python CGI Programming Python MySQL Python Network Programming Python SMTP Python Multithreading Python XML Parsing Python GUI Programming (Tkinter) Python 2.x vs 3.x Python IDE Python JSON Python AI Drawing Python 100 Examples Python Quiz

Python Number

Python Lists

Deep Dive

  • Programming
  • Scripting Languages
  • Software
  • Script
  • Programming Languages
  • Computer Science
  • Web Design & Development
  • Web Service
  • Development Tools
  • Web Services

Python2.x Python min() Method

Python Strings Python Strings


Description

The Python min() method returns the smallest character in the string.

Syntax

min() method syntax:

min(str)

Parameters

  • str -- The string.

Return Value

Returns the smallest character in the string.

Example

The following example demonstrates the usage of the min() function:

#!/usr/bin/python
str = "this-is-real-string-example....wow!!!";
print("Min character: ") + min(str);

str = "this-is-a-string-example....wow!!!";
print("Min character: ") + min(str);

The output of the above example is:

Min character: !
Min character: !

Python Strings Python Strings

Python Number

Python Lists

Category Navigation

← Python ObjectAtt String Isdigit β†’